Add source:isPaused() (enhancement #141)

This commit is contained in:
Bart van Strien
2010-12-19 12:30:59 +01:00
parent acf94d0d6d
commit 9856fbc705
7 changed files with 31 additions and 2 deletions
+12
View File
@@ -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();
+2 -1
View File
@@ -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);