Jump to content
  • Advertisement


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


directshow, playing mp3, IBasicAudio not intialising

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

hi, im playing mp3s and midis using directshow. Ive got the playing, stopping, set position, load, and initialising stuff for all that working. But when i try to initialise IBasicAudio, it just crashes. heres my code:
IGraphBuilder *g_pGraphBuilder;
IMediaControl *g_pMediaControl;
IMediaSeeking *g_pMediaSeeking;
IBasicAudio   *g_pBasicAudio;

void create()
		if(SUCCEEDED(CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, reinterpret_cast<void **>(&g_pGraphBuilder))))
				reinterpret_cast<void **>(&g_pMediaControl));
				reinterpret_cast<void **>(&g_pMediaSeeking));
				reinterpret_cast<void **>(&g_pBasicAudio));

the g_pGraphBuilder->QueryInterface(IID_IBasicAudio, reinterpret_cast(&g_pBasicAudio)); line is what is not working. I don''t see why as i have copied it basically directly from the audiobox sample, i just changed the name a little to fit in with my current naming system. Is there anything else i have to do, to get it to initialise? thanks,

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!