aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sky/control.cpp9
-rw-r--r--sky/music/musicbase.h2
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
};