MOHAWK: Add Sound::isPlaying() function.
This commit is contained in:
parent
fe613524e5
commit
feefced3ce
2 changed files with 10 additions and 0 deletions
|
@ -576,6 +576,15 @@ bool Sound::isPlaying(uint16 id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Sound::isPlaying() {
|
||||||
|
for (uint32 i = 0; i < _handles.size(); i++)
|
||||||
|
if (_handles[i].type == kUsedHandle)
|
||||||
|
if (_vm->_mixer->isSoundHandleActive(_handles[i].handle))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
uint Sound::getNumSamplesPlayed(uint16 id) {
|
uint Sound::getNumSamplesPlayed(uint16 id) {
|
||||||
for (uint32 i = 0; i < _handles.size(); i++)
|
for (uint32 i = 0; i < _handles.size(); i++)
|
||||||
if (_handles[i].type == kUsedHandle && _handles[i].id == id) {
|
if (_handles[i].type == kUsedHandle && _handles[i].id == id) {
|
||||||
|
|
|
@ -133,6 +133,7 @@ public:
|
||||||
void pauseSound();
|
void pauseSound();
|
||||||
void resumeSound();
|
void resumeSound();
|
||||||
bool isPlaying(uint16 id);
|
bool isPlaying(uint16 id);
|
||||||
|
bool isPlaying();
|
||||||
uint getNumSamplesPlayed(uint16 id);
|
uint getNumSamplesPlayed(uint16 id);
|
||||||
|
|
||||||
// Myst-specific sound functions
|
// Myst-specific sound functions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue