FULLPIPE: Proper implementation of FullpipeEngine::stopAllSoundInstances()

This commit is contained in:
Eugene Sandulenko 2014-04-27 11:07:41 +03:00
parent eaee951a2f
commit 10d3017737

View File

@ -429,14 +429,11 @@ void FullpipeEngine::stopAllSoundStreams() {
}
void FullpipeEngine::stopAllSoundInstances(int id) {
SoundList *soundList = _currentScene->_soundList;
for (int i = 0; i < _currSoundListCount; i++) {
Sound *sound = _currSoundList1[i]->getSoundItemById(id);
for (int i = 0; i < soundList->getCount(); i++) {
Sound *sound = soundList->getSoundByIndex(i);
if (sound->getId() == id) {
_mixer->stopHandle(sound->getHandle());
}
if (sound)
sound->stop();
}
}