mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Effects re-made to operate on literal names instead of numerical indices.
Added buffer count parameter to queueable source constructor. Added getEffectsList function. Internal cleanup. --HG-- branch : minor
This commit is contained in:
@@ -51,7 +51,7 @@ love::audio::Source *Audio::newSource(love::sound::SoundData *)
|
||||
return new Source();
|
||||
}
|
||||
|
||||
love::audio::Source *Audio::newSource(int, int, int)
|
||||
love::audio::Source *Audio::newSource(int, int, int, int)
|
||||
{
|
||||
return new Source();
|
||||
}
|
||||
@@ -168,17 +168,22 @@ void Audio::setDistanceModel(DistanceModel distanceModel)
|
||||
this->distanceModel = distanceModel;
|
||||
}
|
||||
|
||||
bool Audio::setSceneEffect(int, std::map<Effect::Parameter, float> &)
|
||||
bool Audio::setEffect(const char *, std::map<Effect::Parameter, float> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Audio::setSceneEffect(int)
|
||||
bool Audio::unsetEffect(const char *)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Audio::getSceneEffect(int, std::map<Effect::Parameter, float> &)
|
||||
bool Audio::getEffect(const char *, std::map<Effect::Parameter, float> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Audio::getEffectsList(std::vector<std::string> &list)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
// Implements Audio.
|
||||
love::audio::Source *newSource(love::sound::Decoder *decoder);
|
||||
love::audio::Source *newSource(love::sound::SoundData *soundData);
|
||||
love::audio::Source *newSource(int sampleRate, int bitDepth, int channels);
|
||||
love::audio::Source *newSource(int sampleRate, int bitDepth, int channels, int buffers);
|
||||
int getSourceCount() const;
|
||||
int getMaxSources() const;
|
||||
bool play(love::audio::Source *source);
|
||||
@@ -78,9 +78,10 @@ public:
|
||||
DistanceModel getDistanceModel() const;
|
||||
void setDistanceModel(DistanceModel distanceModel);
|
||||
|
||||
bool setSceneEffect(int slot, std::map<Effect::Parameter, float> ¶ms);
|
||||
bool setSceneEffect(int slot);
|
||||
bool getSceneEffect(int slot, std::map<Effect::Parameter, float> ¶ms);
|
||||
bool setEffect(const char *, std::map<Effect::Parameter, float> ¶ms);
|
||||
bool unsetEffect(const char *);
|
||||
bool getEffect(const char *, std::map<Effect::Parameter, float> ¶ms);
|
||||
bool getEffectsList(std::vector<std::string> &list);
|
||||
int getMaxSceneEffects() const;
|
||||
int getMaxSourceEffects() const;
|
||||
bool isEFXsupported() const;
|
||||
|
||||
@@ -254,22 +254,27 @@ bool Source::getFilter(std::map<Filter::Parameter, float> &)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::setSceneEffect(int, int)
|
||||
bool Source::setEffect(const char *)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::setSceneEffect(int, int, const std::map<Filter::Parameter, float> &)
|
||||
bool Source::setEffect(const char *, const std::map<Filter::Parameter, float> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::setSceneEffect(int)
|
||||
bool Source::unsetEffect(const char *)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::getSceneEffect(int, int &, std::map<Filter::Parameter, float> &)
|
||||
bool Source::getEffect(const char *, std::map<Filter::Parameter, float> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::getEffectsList(std::vector<std::string> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -86,10 +86,11 @@ public:
|
||||
virtual bool setFilter();
|
||||
virtual bool getFilter(std::map<Filter::Parameter, float> ¶ms);
|
||||
|
||||
virtual bool setSceneEffect(int slot, int effect);
|
||||
virtual bool setSceneEffect(int slot, int effect, const std::map<Filter::Parameter, float> ¶ms);
|
||||
virtual bool setSceneEffect(int slot);
|
||||
virtual bool getSceneEffect(int slot, int &effect, std::map<Filter::Parameter, float> ¶ms);
|
||||
virtual bool setEffect(const char *effect);
|
||||
virtual bool setEffect(const char *effect, const std::map<Filter::Parameter, float> ¶ms);
|
||||
virtual bool unsetEffect(const char *effect);
|
||||
virtual bool getEffect(const char *effect, std::map<Filter::Parameter, float> ¶ms);
|
||||
virtual bool getEffectsList(std::vector<std::string> &list);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user