From 3ace3769c9316c7ab00aa31d42ac6d7c2db5e330 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 3 Sep 2005 17:30:16 +0000 Subject: (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 --- music/dmusic.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'music') diff --git a/music/dmusic.cpp b/music/dmusic.cpp index 9f4f0c10d..28a43803f 100644 --- a/music/dmusic.cpp +++ b/music/dmusic.cpp @@ -113,20 +113,20 @@ static const char* DMusicMidiStart(const char* const* parm) 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(); } -- cgit v1.2.3-70-g09d2