• Advertisement

Archived

This topic is now archived and is closed to further replies.

Problems with DirectMusic

This topic is 5080 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, this sucks. I can''t figure this one out.
	if(DM_Performance)
	{
		DM_Performance->Stop(NULL, NULL, 0, 0);
		DM_Performance->CloseDown();
	}
	if(DM_Segment	 ) DM_Segment	 ->Release();
	if(DM_Loader	 ) DM_Loader	 ->Release();
	if(DM_Performance) DM_Performance->Release(); 
I load a midi and play it; everything works out just fine. The music plays, things run fine, everything''s good. Then when I shut down, the moment it hits the DM_Performance->Stop() it decides to crash (access violation). This works fine in my other project and I can''t see what''s wrong, really. Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
Neeever mind, found it. I was somehow calling my Deinitalise function twice when quitting (once when the user opts to quite and once when an SDL_QUIT is received) so it was being ->Release()''ed twice. The second time around, since it was invalid, it crashed.

I just added a DM_Segment = NULL; etc to everything and it ran fine.

Share this post


Link to post
Share on other sites

  • Advertisement