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
 
@@ -110,26 +110,26 @@ static const char* DMusicMidiStart(const
 
	return NULL;
 
}
 

	
 

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

	
 

	
 
static void DMusicMidiPlaySong(const char* filename)
0 comments (0 inline, 0 general)