diff options
-rw-r--r-- | engines/sci/sound/music.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 3e806f06b1..8ef636c80f 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -474,15 +474,13 @@ void MusicEntry::doFade() { if (fadeTicker) fadeTicker--; else { - int16 fadeVolume = volume; fadeTicker = fadeTickerStep; - fadeVolume += fadeStep; - if (((fadeStep > 0) && (fadeVolume >= fadeTo)) || ((fadeStep < 0) && (fadeVolume <= fadeTo))) { - fadeVolume = fadeTo; + volume += fadeStep; + if (((fadeStep > 0) && (volume >= fadeTo)) || ((fadeStep < 0) && (volume <= fadeTo))) { + volume = fadeTo; fadeStep = 0; fadeCompleted = true; } - volume = fadeVolume; // Only process MIDI streams in this thread, not digital sound effects if (pMidiParser) |