mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Add source:isPaused() (enhancement #141)
This commit is contained in:
@@ -112,6 +112,18 @@ namespace openal
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Source::isPaused() const
|
||||
{
|
||||
if(valid)
|
||||
{
|
||||
ALenum state;
|
||||
alGetSourcei(source, AL_SOURCE_STATE, &state);
|
||||
return (state == AL_PAUSED);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Source::isFinished() const
|
||||
{
|
||||
return type == TYPE_STATIC ? isStopped() : isStopped() && !isLooping() && decoder->isFinished();
|
||||
|
||||
@@ -76,7 +76,8 @@ namespace openal
|
||||
virtual void pause();
|
||||
virtual void resume();
|
||||
virtual void rewind();
|
||||
virtual bool isStopped() const;
|
||||
virtual bool isStopped() const;
|
||||
virtual bool isPaused() const;
|
||||
virtual bool isFinished() const;
|
||||
virtual void update();
|
||||
virtual void setPitch(float pitch);
|
||||
|
||||
Reference in New Issue
Block a user