Archived

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

The Wizard Of Oz

DirectSound

Recommended Posts

hi! i''m creating a game in OpenGL and I''d like to use mp3s as music files, but I don''t know how to load them using DirectSound... I''ve read all of mp3 info into classes souch as ID3 tag, frames No., bitrate, frequency and so on... now I''d need DirectSound functions to load the sound data out of each mp3 frame, and don''t know which functions to use... does anybody know where can I find good DirectSound tutorials/demoes/source code and such? thanks in advance follow the yellow brick road

Share this post


Link to post
Share on other sites
S1CA    1418
Use DirectShow - it''s much easier. It uses any codecs which have been installed with Media Player - this includes MP3 and WMA.

Look in the DirectX SDK documentation under:
DirectX 8.1 (C++) ->
DirectShow ->
Getting Started ->
How To Play a File

For the simplest code required to play a .MP3 file.

Also look at the BGMusic sample (amongst others). It''s in DXSDK\samples\Multimedia\DirectShow\Players\BGMusic.

You don''t need to do any manual decoding work - this will all be done by the codec!


--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Hi,

you can''t use DirectSound for that purpose. You have to use DirectShow. The samples in the DirectX 8 SDK are very helpful.
Just have look at them or go to www.msdn.microsoft.com there you''ll find the help as online version :-)

Good luck

Jan

quote:
Original post by The Wizard Of Oz
hi!
i''m creating a game in OpenGL and I''d like to use mp3s as music files, but I don''t know how to load them using DirectSound...
I''ve read all of mp3 info into classes souch as ID3 tag, frames No., bitrate, frequency and so on...
now I''d need DirectSound functions to load the sound data out of each mp3 frame, and don''t know which functions to use...
does anybody know where can I find good DirectSound tutorials/demoes/source code and such?

thanks in advance

follow the yellow brick road


Share this post


Link to post
Share on other sites