diff options
author | Jamieson Christian | 2003-05-23 15:14:44 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-05-23 15:14:44 +0000 |
commit | 790b2e1e9a9b4b63fcf63b19428661d08fddd998 (patch) | |
tree | ab088a4cf3a71ab4117c86462247e3925fb4cf43 | |
parent | 982883c6371133dca8c861391a07920a9a96c2ff (diff) | |
download | scummvm-rg350-790b2e1e9a9b4b63fcf63b19428661d08fddd998.tar.gz scummvm-rg350-790b2e1e9a9b4b63fcf63b19428661d08fddd998.tar.bz2 scummvm-rg350-790b2e1e9a9b4b63fcf63b19428661d08fddd998.zip |
Fixed problem with Simon music playing even when paused.
svn-id: r7864
-rw-r--r-- | simon/midi.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp index c181511d40..f12aa4d191 100644 --- a/simon/midi.cpp +++ b/simon/midi.cpp @@ -127,7 +127,7 @@ void MidiPlayer::metaEvent (byte type, byte *data, uint16 length) { void MidiPlayer::onTimer (void *data) { MidiPlayer *player = (MidiPlayer *) data; player->_system->lock_mutex (player->_mutex); - if (!player->_paused && player->_parser) + if (!player->_paused && player->_parser && player->_currentTrack != 255) player->_parser->onTimer(); player->_system->unlock_mutex (player->_mutex); } @@ -170,11 +170,9 @@ void MidiPlayer::startTrack (int track) { } _system->unlock_mutex (_mutex); - pause (false); } void MidiPlayer::stop() { - pause (true); _system->lock_mutex (_mutex); _currentTrack = 255; _system->unlock_mutex (_mutex); @@ -294,7 +292,6 @@ void MidiPlayer::loadSMF (File *in, int song) { parser = 0; } - _paused = true; _currentTrack = 255; memset(_volumeTable, 127, sizeof(_volumeTable)); _parser = parser; // That plugs the power cord into the wall @@ -350,7 +347,6 @@ void MidiPlayer::loadMultipleSMF (File *in) { _song_sizes[i] = size; } - _paused = true; _currentTrack = 255; memset(_volumeTable, 127, sizeof(_volumeTable)); _system->unlock_mutex (_mutex); @@ -397,7 +393,6 @@ void MidiPlayer::loadXMIDI (File *in) { parser = 0; } - _paused = true; _currentTrack = 255; memset(_volumeTable, 127, sizeof(_volumeTable)); _parser = parser; // That plugs the power cord into the wall |