Sign in to follow this  
BEHOLDER192875

Using DirectX9 to play Ogg Vorbis files

Recommended Posts

You can use either XAudio2, or the depreciated DirectSound.
I don't think that either of them provide simple functions that just plays a .ogg file, so you'll have to write the loader yourself.

This process can be much simplifyied if you go visit the theora site here and download the provided decoders. You'll need libogg and libvorbis. The documentation there should help you get started.

Share this post


Link to post
Share on other sites
This GameDev article might help you. It shouldn't be too difficult to replace the OpenAL stuff with XAudio2 or Directsound code (I'd recommend XAudio2, because it's better supported and is a nicer API anyway). Basically you can't directly play it, you're going to have to use libogg and libvorbis to decode it to PCM data, then play that with some other audio API. You can stream it, or do it all in one go.

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