DirectSound
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
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
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
i looked into it but i''m lacking a file called dshow.h
can you tell me where to download it from, or mail it to me?
can you tell me where to download it from, or mail it to me?
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement