diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index 7a0d244273a..ebb5983931e 100644 --- a/scumm/imuse.cpp +++ b/scumm/imuse.cpp @@ -594,12 +594,7 @@ int IMuseInternal::get_master_volume() { } int IMuseInternal::terminate() { - // We are going to remove the MIDI drivers, - // so first pull any reference to them by - // the parts. - int i; - for (i = 0; i < ARRAYSIZE(_parts); ++i) - _parts[i]._mc = 0; + stop_all_sounds(); if (_midi_adlib) { _midi_adlib->close(); diff --git a/sound/midiparser.h b/sound/midiparser.h index 5e5bb6ca49a..4ac4a69746c 100644 --- a/sound/midiparser.h +++ b/sound/midiparser.h @@ -234,7 +234,7 @@ public: public: MidiParser(); - virtual ~MidiParser() { } + virtual ~MidiParser() { allNotesOff(); } virtual bool loadMusic (byte *data, uint32 size) = 0; virtual void unloadMusic();