diff options
author | Eugene Sandulenko | 2005-03-18 11:05:15 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-03-18 11:05:15 +0000 |
commit | 749cf8a083460e18db96c24220f756307dd0b4d0 (patch) | |
tree | 3bf851d46da2675dde3114a1ad9afb2de966ba38 /sky | |
parent | 0bd4c7b8bcfa554310c5129bee45256b6410bc21 (diff) | |
download | scummvm-rg350-749cf8a083460e18db96c24220f756307dd0b4d0.tar.gz scummvm-rg350-749cf8a083460e18db96c24220f756307dd0b4d0.tar.bz2 scummvm-rg350-749cf8a083460e18db96c24220f756307dd0b4d0.zip |
Apply patch #1162546 "BASS: Hanging notes fix / patch". Thanks __tom.
svn-id: r17177
Diffstat (limited to 'sky')
-rw-r--r-- | sky/control.cpp | 9 | ||||
-rw-r--r-- | sky/music/musicbase.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sky/control.cpp b/sky/control.cpp index 7041d81a00..3a9cb09ff2 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -1573,6 +1573,15 @@ void Control::showGameQuitMsg(bool useScreen) { _skyScreen->halvePalette(); _skyScreen->showScreen(screenData); free(textBuf1); free(textBuf2); + + // __tom (FIXME): This is a poor method of turning + // off music. ~GmMusic, ~AdlibMusic, and ~MT32Music + // should do it themselves so the appropriate MIDI + // controller events (e.g. 123/'All Notes Off') can + // be sent. However, that requires a re-write of + // other code and for now this fixes hanging notes + // on MT-32 + other external GMIDI synths. + _skyMusic->stopMusic(); delay(1500); ConfMan.flushToDisk(); _system->quit(); diff --git a/sky/music/musicbase.h b/sky/music/musicbase.h index f44c828d83..40785c7cfd 100644 --- a/sky/music/musicbase.h +++ b/sky/music/musicbase.h @@ -53,6 +53,7 @@ public: void loadSection(uint8 pSection); void musicCommand(uint16 command); void startMusic(uint16 param) { _onNextPoll.musicToProcess = param & 0xF; }; // 4 + void stopMusic(); // 7 bool musicIsPlaying(void); virtual void setVolume(uint8 volume) = 0; uint8 giveVolume(void) { return (uint8)_musicVolume; }; @@ -87,7 +88,6 @@ protected: void setTempo(uint16 newTempo); // 2 void pollMusic(); // 3 void reinitFM(void) { _onNextPoll.doReInit = true; }; // 6 - void stopMusic(); // 7 void setFMVolume(uint16 param); // 13 }; |