Archived

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

AndyTX

DirectX Audio (DX9)

Recommended Posts

I''ve been looking on and off at the new interface for DX9 Audio programming, and it still seems a bit hacked together for me, so I was hoping someone with experience (or even just insight) could clear some things up for me: I want to have MIDIs played through DirectMusic and WAVs through DirectSound... which now seems that I can do this by having simply a performance object and a loader, not even worrying about DSound (basically treating everything as a DMusic segment)... is this the case? If it is however, will I take any sort of performance hit over doing it the old way? Is there a way to make DMusic a little less "jittery" in DX9? In DX8.1 it tended to use very little CPU (0-5%) but every few seconds it would steal a fair amount for a tiny period, resulting in the game just looking a lot less smooth... If using the new system, how do I use some of the same DSound features as before? Most notably, I can find NO documentation on how to create duplicate buffers (for playing the same sound multiple times on top of itself)! Thanks in advance for any insight... it is appreciated! If I can solve these last few problems, I think I''ll switch the Audio in my game over to the new standards. Otherwise I might just have to deal with the "jitter"... (which realistically, I''m the only one who notices anyways!)

Share this post


Link to post
Share on other sites
Hmmm... I''ve asked this once before a long time ago and got a similar response Has no one used DirectXAudio? These CAN''T be uncommon questions...

Share this post


Link to post
Share on other sites
Hmmm I admit that this surprises me. Normally there are an overwhelming amount of people with experience.

At the very least, does anyone know how to duplicate buffers in the new version? I can''t find any documentation to this end anywhere...

Share this post


Link to post
Share on other sites
quote:
is this the case?

Yes this is the case. Basically direct music can handle midis and wavs for you without you needing to use direcft sound. although if you want to access the low level stuff and be able to apply some effects to the music like 3d effects or distortion effects, then you'll have to get access to the direct sound buffer that direct music actually handles for you.

quote:
resulting in the game just looking a lot less smooth...

Really? I havent experienced this, anyway, you can try putting it in a different thread, or maybe you're calling the music functions at a critical rendering time or something, dunno.

quote:
(for playing the same sound multiple times on top of itself)!

You dont ened to duplicate a sound buffer to do this with direct music, Just create the direct music segment as a SECONDARY segment. I dont really think there is a difference between dx8 and dx9 audio. the docs say that there were just a few optimizations here and there but no real changes.


Basically if you want low level access (meaning direct sound type control) you can grab hold of an audio path and play around with it. The audio path is the path the the music travels on and if you change the stops the music makes on the audio path, you can make your music sound different. I think you can even directly access teh secondary buffers with an audio path.

Im sorry but my directx audio is a little rusty, I just programmed a wrapper a few months ago and I havent touched it since, so I may be off with a few of these things. ]

[edit]
by the way. The search feature is back up on the site so give that a shot
[/edit]


:::: [ Triple Buffer V2.0 ] ::::


[edited by - IFooBar on March 5, 2003 6:11:27 AM]

Share this post


Link to post
Share on other sites
Ahh brilliant. Thanks for answering my questions.

Any reason why you don''t need to create "duplicate" secondary buffers as before?

Share this post


Link to post
Share on other sites