mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
[win32] Call 'update' method in 'stop/stopAll' to cleanup immediately
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user