(svn r2911) Deinitialise the DirectMusic driver like it's done in the example code in MSDN, this should fix a strange crash upon deinitialising wave out sound
--- a/music/dmusic.cpp Sat Sep 03 12:28:39 2005 +0000
+++ b/music/dmusic.cpp Sat Sep 03 17:30:16 2005 +0000
@@ -113,20 +113,20 @@
static void DMusicMidiStop(void)
{
- /* release everything but the segment, which the performance
- * will release automatically (and it'll crash if it's been
- * released already) */
-
seeking = false;
- loader->Release();
- loader = NULL;
+ performance->Stop(NULL, NULL, 0, 0);
+
+ segment->SetParam(GUID_Unload, -1, 0, 0, performance);
+ segment->Release();
+ segment = NULL;
performance->CloseDown();
performance->Release();
performance = NULL;
- segment = NULL;
+ loader->Release();
+ loader = NULL;
proc.CoUninitialize();
}