mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Implement audio filters
Use Source:setFilter(type, params...) to set a filter. Use Source:setFilter() to detach the current filter. Use Source:getFilter() to get the currently set filter (or nil). Squashed from pull request 27, and the clean-pr27 branch in love-experiments. --HG-- branch : minor
This commit is contained in:
@@ -227,6 +227,21 @@ bool Source::queue(void *, size_t, int, int, int)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::setFilter(love::audio::Filter::Type, std::vector<float> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::setFilter()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::getFilter(love::audio::Filter::Type &, std::vector<float> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
} // null
|
||||
} // audio
|
||||
} // love
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
// LOVE
|
||||
#include "common/Object.h"
|
||||
#include "audio/Source.h"
|
||||
#include "audio/Filter.h"
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -79,6 +80,10 @@ public:
|
||||
virtual int getFreeBufferCount() const;
|
||||
virtual bool queue(void *data, size_t length, int dataSampleRate, int dataBitDepth, int dataChannels);
|
||||
|
||||
virtual bool setFilter(love::audio::Filter::Type type, std::vector<float> ¶ms);
|
||||
virtual bool setFilter();
|
||||
virtual bool getFilter(love::audio::Filter::Type &type, std::vector<float> ¶ms);
|
||||
|
||||
private:
|
||||
|
||||
float pitch;
|
||||
|
||||
Reference in New Issue
Block a user