Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have reopened one older project that uses DirectShow for audio playback. Before, I would compile and run it on Windows 7 using MVStudio 2010 without trouble, now I have Windows 8 and MVStudio 2012 and I have an error when running it (building works).

It seems that the problem is when trying to render any mp3 file, I have created a small test code that reproduces the error:

INT WINAPI WinMain(HINSTANCE inst, HINSTANCE prev_inst, LPSTR cmd, INT show) { 
    createWindow(); // Just basic Win API window.

    IGraphBuilder *audio_graph;
    IMediaControl *audio_media_control;
    CoInitializeEx(NULL, COINIT_MULTITHREADED);
    CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&audio_graph);
    audio_graph->QueryInterface(IID_IMediaControl, (void **)&audio_media_control);
    audio_graph->RenderFile(L"test.mp3", NULL);
    audio_media_control->Run();

    runLoop(); 
}

when trying run inside MVS (even without any debug information collected), I get following error:

Unhandled exception at 0x57FC2170 (msaud32_divx.acm) in StoryTeller.exe: 0xC0000005: Access violation executing location 0x57FC2170.

and the execution brakes at the RenderFile method. The exception is apparently from some other thread since even catch with ellipsis does not affect it.

However when I run the executable, it works normally. The exception is not raised for ".wav" audio files.

Any idea what might be wrong? Google seems silent about it, so thanks for any answer :).

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.