kamaliang
25-06-2009 07:48:58
Hi,
Sometime I want to change scene, and when the old scene have been changed i also need to change the sounds belong to it...so i call
OgreOggSoundManager::destroyAllSounds to clear all the old sounds, but while in the BOOST_THREAD mode, it is crashed in the
OgreOggSoundManager::updateBuffers, cause "mActiveSounds" do not be cleared in the "destroyAllSounds" and result in that "(*i)->_updateAudioBuffers()" is
crashing...
So.. I add these code after "mSoundMap.clear()" in the destroyAllSounds func like below:
mSoundMap.clear();
mActiveSounds.clear();
mPlayQueue.clear();
mPauseQueue.clear();
mStopQueue.clear();
mPausedSounds.clear();
mSoundsToReactivate.clear();
...
Did i do the right way ? Thanks....
Sometime I want to change scene, and when the old scene have been changed i also need to change the sounds belong to it...so i call
OgreOggSoundManager::destroyAllSounds to clear all the old sounds, but while in the BOOST_THREAD mode, it is crashed in the
OgreOggSoundManager::updateBuffers, cause "mActiveSounds" do not be cleared in the "destroyAllSounds" and result in that "(*i)->_updateAudioBuffers()" is
crashing...
So.. I add these code after "mSoundMap.clear()" in the destroyAllSounds func like below:
mSoundMap.clear();
mActiveSounds.clear();
mPlayQueue.clear();
mPauseQueue.clear();
mStopQueue.clear();
mPausedSounds.clear();
mSoundsToReactivate.clear();
...
Did i do the right way ? Thanks....