mirror of https://github.com/OpenTTD/OpenTTD
(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
parent
3dd2dab7e9
commit
3ace3769c9
|
@ -113,20 +113,20 @@ static const char* DMusicMidiStart(const char* const* parm)
|
||||||
|
|
||||||
static void DMusicMidiStop(void)
|
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;
|
seeking = false;
|
||||||
|
|
||||||
loader->Release();
|
performance->Stop(NULL, NULL, 0, 0);
|
||||||
loader = NULL;
|
|
||||||
|
segment->SetParam(GUID_Unload, -1, 0, 0, performance);
|
||||||
|
segment->Release();
|
||||||
|
segment = NULL;
|
||||||
|
|
||||||
performance->CloseDown();
|
performance->CloseDown();
|
||||||
performance->Release();
|
performance->Release();
|
||||||
performance = NULL;
|
performance = NULL;
|
||||||
|
|
||||||
segment = NULL;
|
loader->Release();
|
||||||
|
loader = NULL;
|
||||||
|
|
||||||
proc.CoUninitialize();
|
proc.CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue