summaryrefslogtreecommitdiff
path: root/muse2/muse/song.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/muse/song.cpp')
-rw-r--r--muse2/muse/song.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index 6a43e457..a994b0e6 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -2341,6 +2341,8 @@ void Song::cleanupForQuit()
printf("deleting midi devices except synths\n");
for(iMidiDevice imd = midiDevices.begin(); imd != midiDevices.end(); ++imd)
{
+ // Close the device. Handy to do all devices here, including synths.
+ (*imd)->close();
// Since Syntis are midi devices, there's no need to delete them below.
if((*imd)->isSynti())
continue;
@@ -2373,12 +2375,16 @@ void Song::cleanupForQuit()
continue;
delete (*imi);
}
- midiInstruments.clear(); // midi devices
+ midiInstruments.clear(); // midi instruments
// Nothing required for ladspa plugin list, and rack instances of them
// are handled by ~AudioTrack.
if(MusEGlobal::debugMsg)
+ printf("Muse: Deleting sound files\n");
+ SndFile::sndFiles.clearDelete();
+
+ if(MusEGlobal::debugMsg)
printf("...finished cleaning up.\n");
}