Changeset - r2385:3efdfdc0c97c
[Not reviewed]
master
0 1 0
tron - 19 years ago 2005-09-03 17:30:16
tron@openttd.org
(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
1 file changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
music/dmusic.cpp
Show inline comments
 
@@ -113,20 +113,20 @@ static const char* DMusicMidiStart(const
 

	
 
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();
 
}
0 comments (0 inline, 0 general)