From 546352dbe311a11cbd1e2da9335ef38b9197d59f Mon Sep 17 00:00:00 2001 From: Lennart Bernhardt Date: Tue, 8 Aug 2017 03:31:01 +0200 Subject: [PATCH] avoid starting sound updates more than necessary --- apps/openmw/mwsound/soundmanagerimp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index 88ee42b01..c6f663059 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -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); } }