diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index e00e5eecd..f984bd96f 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -95,6 +95,7 @@ namespace MWSound mUnderwaterSound.reset(); mActiveSounds.clear(); mActiveSaySounds.clear(); + mUnderwaterSound.reset(); mMusic.reset(); if(mOutput->isInitialized()) { @@ -832,10 +833,18 @@ namespace MWSound SoundNamePairList::iterator sndname = snditer->second.begin(); for(;sndname != snditer->second.end();++sndname) { - sndname->first->mBaseVolume = volumeFromType(sndname->first->getPlayType()); - sndname->first->update(); + MWBase::SoundPtr sound = sndname->first; + sound->mBaseVolume = volumeFromType(sound->getPlayType()); + sound->update(); } } + SaySoundMap::iterator sayiter = mActiveSaySounds.begin(); + for(;sayiter != mActiveSaySounds.end();++sayiter) + { + MWBase::SoundPtr sound = sayiter->second.first; + sound->mBaseVolume = volumeFromType(sound->getPlayType()); + sound->update(); + } if(mMusic) { mMusic->mBaseVolume = volumeFromType(mMusic->getPlayType()); @@ -952,6 +961,7 @@ namespace MWSound for(;sayiter != mActiveSaySounds.end();++sayiter) sayiter->second.first->stop(); mActiveSaySounds.clear(); + mUnderwaterSound.reset(); stopMusic(); } }