Archived

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

gacek

DirectX Audio (basics)

Recommended Posts

could somebody tell me what objects should I use to be able to 1. play some music (background) (as far as i know for DXAudio it doesn''t matter wave or mid) 2. play some wave files as sound effects (more than one, each of them at different position (3D)) will one performance object be enough? should I create multiple audiopaths (to get a 3d buffer from each of them) or use only one? I don''t think that any of DX8 samples shows how to do it. gacek

Share this post


Link to post
Share on other sites
Take a look at the Donuts3D sample which comes with the SDK. The dmutil.cpp file contains all the code used to play back the audio. It is basically a DirectAudio (aka DirectMusic) wrapper which you can take and use in your own game, if you wish.

I would suggest breakpointing all of the functions so that you get an understanding of which are used, when they are called, and how they are called.

In answer to your specific questions: Games will usually only need one performance object. Only wierd "work-arounds" will require more. And you have the right idea about audiopaths - You will need one for each 3D Buffer.

Cheers,
John

Share this post


Link to post
Share on other sites