diff options
author | Jamieson Christian | 2003-09-24 09:32:38 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-09-24 09:32:38 +0000 |
commit | a7dfe35706d6a618476b78d5542e1c2ffd0923db (patch) | |
tree | 54f6f5d529494547e9054da0220187a3efb386ab | |
parent | c8fbafda9a3f7e3cc40612e6fa2f450a5a6459ff (diff) | |
download | scummvm-rg350-a7dfe35706d6a618476b78d5542e1c2ffd0923db.tar.gz scummvm-rg350-a7dfe35706d6a618476b78d5542e1c2ffd0923db.tar.bz2 scummvm-rg350-a7dfe35706d6a618476b78d5542e1c2ffd0923db.zip |
Fix for Bug [805923] BASS: Notes left on when quitting game
Explicitly send All Notes Off messages on every
channel when shutting down music driver. This
fixes hanging notes on exit when using external
synths or some less intelligent internal synths.
svn-id: r10398
-rw-r--r-- | sky/music/gmmusic.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sky/music/gmmusic.cpp b/sky/music/gmmusic.cpp index b4fdeeb510..58f65e73e6 100644 --- a/sky/music/gmmusic.cpp +++ b/sky/music/gmmusic.cpp @@ -44,6 +44,9 @@ SkyGmMusic::~SkyGmMusic(void) { _midiDrv->setTimerCallback(NULL, NULL); if (_currentMusic) stopMusic(); + // Send All Notes Off (for external synths) + for (int i = 0; i < 16; ++i) + _midiDrv->send ((123 << 8) | 0xB0 | i); _midiDrv->close(); delete _midiDrv; } |