mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Rename love.audio.getSourceCount to getActiveSourceCount and deprecate the old function (resolves issue #1302).
--HG-- branch : minor
This commit is contained in:
@@ -234,9 +234,9 @@ love::audio::Source *Audio::newSource(int sampleRate, int bitDepth, int channels
|
||||
return new Source(pool, sampleRate, bitDepth, channels, buffers);
|
||||
}
|
||||
|
||||
int Audio::getSourceCount() const
|
||||
int Audio::getActiveSourceCount() const
|
||||
{
|
||||
return pool->getSourceCount();
|
||||
return pool->getActiveSourceCount();
|
||||
}
|
||||
|
||||
int Audio::getMaxSources() const
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
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, int buffers);
|
||||
int getSourceCount() const;
|
||||
int getActiveSourceCount() const;
|
||||
int getMaxSources() const;
|
||||
bool play(love::audio::Source *source);
|
||||
bool play(const std::vector<love::audio::Source*> &sources);
|
||||
|
||||
@@ -115,7 +115,7 @@ void Pool::update()
|
||||
releaseSource(s);
|
||||
}
|
||||
|
||||
int Pool::getSourceCount() const
|
||||
int Pool::getActiveSourceCount() const
|
||||
{
|
||||
return (int) playing.size();
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
void update();
|
||||
|
||||
int getSourceCount() const;
|
||||
int getActiveSourceCount() const;
|
||||
int getMaxSources() const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user