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


creating a mp3 player and encoder with directsound

Recommended Posts

Method #1: Use DirectShow (it''s not just for movies - its for anything that needs to use one of the installed multimedia codecs). There are DirectShow samples in the DirectX SDK such as PlayWnd which will show you how to play .mp3 files. Likewise there are samples which demonstrate the encoding process. The CaptureSound DirectSound sample shows you the capture part.

Method #2: Use ACM (Audio Compression Manager) functions and DirectSound. This is essentially what DirectShow does for you though so there aren''t many reasons to do it this way.

Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP

Share this post

Link to post
Share on other sites
The DXSDK also contains some basic players for video and audio, amonst them being mp3 players.

You can certainly cut up the DirectShow/players samples and extract only the audio/mp3 portions of it, and put it into your game for full mp3 support.

I have done something similar (simplified the demo, and made a nice simple mp3 wrapper class), and can now play mp3 files in my apps.

Share this post

Link to post
Share on other sites