Jump to content
  • Advertisement

Archived

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

Raptor

Playing MP3s

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

are there any tutorials or samples for playing mp3s in ur app??? well, most preferably, i would like it to use direct sound. thnx in advance, Raptor

Share this post


Link to post
Share on other sites
Advertisement
I don''t know of this will help because I''ve been looking for tut''s like that myself, but I did find this nifty site over a search engine called http://www.wotsit.org. Here you''ll find info on countless file formats including (I think) MP3s. If you don''t, I don''t know what to tell you. Just keep looking.

Share this post


Link to post
Share on other sites
What tools/SDK are you using?

DirectX 8 has DirectShow built into it. You can use it to play MP3 files (and many other audio/video formats) easily.

Check out the ''PlayWnd'' sample in the DirectShow directory of the samples after installing DirectX 8.


For older versions of DirectX, you could obtain the DirectShow SDK seperately. You can find it on Microsoft''s site. A good starting point is: http://www.microsoft.com/DirectX/dxm/


Alternately, you could use the Windows Media SDK (also from Microsoft), available for download at http://www.microsoft.com/windows/windowsmedia/en/default.asp
Using the WMSDK you can easily extract the sample data from MP3 (and WMA) files and feed them to DirectSound with your own code.

Or you could use a third party library like the Miles sound library, available from: http://www.radgametools.com/


If you might ever want your app to run on platforms other than Windows, you might consder using SDL ( http://www.libsdl.org ) and its SMPEG library (for MP3 decode/play). SDL is a fairly
low level library that gives you functionality similar to DirectX but with an abstraction API that is implemented with different internals for every supported platform (Windows, Linux, Mac, QNX, etc)

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!