(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

This commit is contained in:
tron 2005-09-03 17:30:16 +00:00
parent 4c47773603
commit c74903dc80

View File

@ -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();
}