diff options
author | Filippos Karapetis | 2012-07-15 17:37:55 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-07-15 17:37:55 +0300 |
commit | 1fffbe40ceb82bec77479c56176abeff0d2bd5e5 (patch) | |
tree | a40bd14a8296e89473589f4d7c3f511ce6a1793e /engines/tinsel/tinlib.cpp | |
parent | 4c3b4835aae1fe671253a65f6a10649c5ab2014c (diff) | |
download | scummvm-rg350-1fffbe40ceb82bec77479c56176abeff0d2bd5e5.tar.gz scummvm-rg350-1fffbe40ceb82bec77479c56176abeff0d2bd5e5.tar.bz2 scummvm-rg350-1fffbe40ceb82bec77479c56176abeff0d2bd5e5.zip |
TINSEL: Change SetMidiVolume() so that it doesn't start/stop music tracks
Previously, SetMidiVolume() would stop the currently playing track when
the MIDI volume was set to 0. Now, the music track always plays, even
when the volume is set to 0. This fixes bug #3541533 - "DW: Silencing
music volume stops music" and resolves two FIXME comments
Diffstat (limited to 'engines/tinsel/tinlib.cpp')
-rw-r--r-- | engines/tinsel/tinlib.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 7c4fec6592..058f8eb6fd 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -1625,10 +1625,6 @@ static void Play(CORO_PARAM, SCNHANDLE hFilm, int x, int y, bool bComplete, int * Play a midi file. */ static void PlayMidi(CORO_PARAM, SCNHANDLE hMidi, int loop, bool complete) { - // FIXME: This is a workaround for the FIXME below - if (GetMidiVolume() == 0) - return; - CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); @@ -1637,18 +1633,13 @@ static void PlayMidi(CORO_PARAM, SCNHANDLE hMidi, int loop, bool complete) { PlayMidiSequence(hMidi, loop == MIDI_LOOP); - // FIXME: The following check messes up the script arguments when - // entering the secret door in the bookshelf in the library, - // leading to a crash, when the music volume is set to 0 (MidiPlaying() - // always false then). - // - // Why exactly this happens is unclear. An analysis of the involved - // script(s) might reveal more. - // - // Note: This check&sleep was added in DW v2. It was most likely added - // to ensure that the MIDI song started playing before the next opcode + // This check&sleep was added in DW v2. It was most likely added to + // ensure that the MIDI song started playing before the next opcode // is executed. - if (!MidiPlaying()) + // In DW1, it messes up the script arguments when entering the secret + // door in the bookshelf in the library, leading to a crash, when the + // music volume is set to 0. + if (!MidiPlaying() && TinselV2) CORO_SLEEP(1); if (complete) { |