diff options
-rw-r--r-- | kyra/sound.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kyra/sound.cpp b/kyra/sound.cpp index 32c8e2f3d1..2b3f449114 100644 --- a/kyra/sound.cpp +++ b/kyra/sound.cpp @@ -250,7 +250,8 @@ void MusicPlayer::onTimer(void *refCon) { MusicPlayer *music = (MusicPlayer *)refCon; // this should be set to the fadeToBlack value - const static uint32 musicFadeTime = 2 * 1000; + static const uint32 musicFadeTime = 2 * 1000; + if (music->_fadeMusicOut && music->_fadeStartTime + musicFadeTime > music->_engine->_system->getMillis()) { byte volume = (byte)((musicFadeTime - (music->_engine->_system->getMillis() - music->_fadeStartTime)) * 255 / musicFadeTime); music->setVolume(volume); |