Advertisement Jump to content


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


Playing MP3s

This topic is 6550 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
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 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:

Alternately, you could use the Windows Media SDK (also from Microsoft), available for download at
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:

If you might ever want your app to run on platforms other than Windows, you might consder using SDL ( ) 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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!