1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 22:45:34 +00:00

avoid starting sound updates more than necessary

This commit is contained in:
Lennart Bernhardt 2017-08-08 03:31:01 +02:00
parent 7b8278ae45
commit 546352dbe3

View file

@ -938,6 +938,8 @@ namespace MWSound
env
);
updateMusic(duration);
// Check if any sounds are finished playing, and trash them
SoundMap::iterator snditer = mActiveSounds.begin();
while(snditer != mActiveSounds.end())
@ -1048,9 +1050,7 @@ namespace MWSound
{
mMusic->updateFade(duration);
mOutput->startUpdate();
mOutput->updateStream(mMusic);
mOutput->finishUpdate();
if (mMusic->getRealVolume() <= 0.f)
{
@ -1072,7 +1072,6 @@ namespace MWSound
updateSounds(duration);
updateRegionSound(duration);
updateWaterSound(duration);
updateMusic(duration);
}
}