Jump to content
  • Advertisement


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


DirectAudio problems...again

This topic is 5835 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

Im getting a strange error..but first let me tell you guys how everything is set up. I have 3 classes, CAudio, CMusic, and CSound..CAudio has the main performance and loader object, and CMusic and CSound have their own segments..What I want is to be able to call stuff like CMusic->loadfile(L"mymidi.mid") etc. Now i did what i wanted, and i get no compile or link errors. However, i get a "unhandled exception" and my app quits on me. Using the debugger, it says that my Loader, which is in my CAudio class, is causing the problem. I have a pointer to the CAudio object in my CMusic object, and here is where the program quits on me:
	// Set the search path

	char searchPath[MAX_PATH];
	WCHAR wSearchPath[MAX_PATH];
	GetCurrentDirectory(MAX_PATH, searchPath);
	MultiByteToWideChar(CP_ACP, 0, searchPath, -1, wSearchPath, MAX_PATH);
	if (FAILED(pDirectAudio->Loader->SetSearchDirectory(GUID_DirectMusicAllTypes, wSearchPath, FALSE)))
		MessageBox(NULL, "SetSearchDirectory Failed", "damn", MB_OK);
	return (TRUE);
the loader is a public member in CAudio.. If anyone could help me I''d be eternally grateful

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!