[win32] Call 'update' method in 'stop/stopAll' to cleanup immediately

This commit is contained in:
James Chen
2017-05-22 09:48:11 +08:00
parent 4edd40c5b4
commit f535ec9b25
@@ -360,6 +360,9 @@ void AudioEngineImpl::stop(int audioID)
//Note: Don't set the flag to false here, it should be set in 'update' function.
// Otherwise, the state got from alSourceState may be wrong
// _alSourceUsed[player->_alSource] = false;
// Call 'update' method to cleanup immediately since the schedule may be cancelled without any notification.
update(0.0f);
}
void AudioEngineImpl::stopAll()
@@ -374,6 +377,9 @@ void AudioEngineImpl::stopAll()
// {
// _alSourceUsed[_alSources[index]] = false;
// }
// Call 'update' method to cleanup immediately since the schedule may be cancelled without any notification.
update(0.0f);
}
float AudioEngineImpl::getDuration(int audioID)