mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(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:
parent
4c47773603
commit
c74903dc80
@ -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
Block a user