Sign in to follow this  
Chetanhl

Best method for playing audio in directx?

Recommended Posts

I searched in DirectXSDK and found that DirectSound is Deprecated.
Found some tutorials of XACT and XAudio2 but they work with some .xsb file format.
Basically what am trying to do is to play .WAV files (for sound effects)
and .MP3 files (for background music or maybe .ogg).

So wanted to know whats the main purpose of XACT and XAudio2 and which will be best suited in my case ?
With some links or refrence to tutorials.

[Edited by - Chetanhl on February 19, 2010 5:22:40 AM]

Share this post


Link to post
Share on other sites
XAudio2 can play natively Wav, xWM, and almost anything your Windows Media Player can play right when installed.
The problem is that you HAVE to do parse of the format by yourself and give the raw data to XAudio2.

Share this post


Link to post
Share on other sites
Quote:
Original post by WuTz
Hi!

I want to load MP3s or OGGs into XAudio, and you sad, that I have to do the Parsing by myself.

How?
For OGG, there's libvorbis (Which is really nice and easy to use). For MP3s, you'll need to use an MP3 decoding library, or DirectShow, FMOD, etc.

Share this post


Link to post
Share on other sites
Hey what are the pro's and con's of using MCI in game for playing wav ,mp3 and even videos ??
Its relatively very easy to play multimedia files using MCI but i dunno if its good to use it in games ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this