Jump to content
  • Advertisement

Archived

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

Bump Lens

the best books? + mp3 streaming while displaying gfx

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

Being new to games/graphic programming I was wondering what books do you people recommend? I''ve been making a little demo and while the playsound function of winmm.lib works fine, I can see the wav files it supports being rather "bulky" to say the least. So I had alook at the DirectX SDK and dshow.h supports mp3 so I put together the code: IGraphBuilder *pGraph; IMediaControl *pMediaControl; IMediaEvent *pEvent; CoInitialize(NULL); // Create the filter graph manager and query for interfaces. CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pGraph); pGraph->QueryInterface(IID_IMediaControl, (void **)&pMediaControl); pGraph->QueryInterface(IID_IMediaEvent, (void **)&pEvent); // Build the graph. IMPORTANT: Change string to a file on your system. pGraph->RenderFile(L"C:\\15.mp3", NULL); // Run the graph. pMediaControl->Run(); // Wait for completion. long evCode; pEvent->WaitForCompletion(INFINITE, &evCode); // Clean up. pMediaControl->Release(); pEvent->Release(); pGraph->Release(); CoUninitialize(); which works fine - however it stops the rendering dead. Do I need to create another window instance to play this while the graphics are rendering or thread it with the rendering or what? Or is there a better way to handle this?

Share this post


Link to post
Share on other sites
Advertisement
"Being new to games/graphic programming I was wondering what books do you people recommend?"

If you''re gonna be learning OpenGL then get OpenGL Game Programming by Kevin Hawkings and Dave Astle. Also get the OpenGL Programming Guide Third Edition by the OpenGL Architecture Review Board. If you''re not sure if you want to learn DirectX or OpenGL then go to http://nehe.gamedev.net/ to read some tutorials on OpenGL to see if you like it.

Share this post


Link to post
Share on other sites
"If you''re not sure if you want to learn DirectX or OpenGL then go to http://nehe.gamedev.net/ to read some tutorials on OpenGL to see if you like it."

I forgot I was on NeHe''s forum so you probally already know about that. Oops!

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!