Jump to content
  • Advertisement
Sign in to follow this  
DrGUI

5.1 surround from DirectSound?

This topic is 4364 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I play 3D sounds using DirectSound, but how do you get it to output over 5 channels? I tried changing the number of channels when creating the primary buffer in the PlaySound3D sample but there didn't seem to be any difference. Thank you!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I think DirectSound only supports 2-channel output, but don't take my word for it. You could also try the slightly more modern XACT tool available in the DirectX August 2006 SDK.

Share this post


Link to post
Share on other sites
Are you setting up a Listener3D around a primary buffer? I have some MDX sample code (I believe from Tom Miller's kickstart book) that shows how to set this up with DirectSound and it seems to work perfectly in 5.1 for my SB Audigy. In the SDK Sample browser you'll also find sample projects in both C# and C++ on how to set this up. Check the Play3DSound sample.

It also might be a driver issue, but if the sample works then you should be good to go.

Share this post


Link to post
Share on other sites
Hey

Yes, the sample Play3DSound was the one I was experimenting on. The sample works but it looks like it's only meant to be stereo.

The speaker configuration was already 5.1, and I tried creating the primary buffer with 5 and 6 channels, but it didn't seem to work.
For 5.1 should I have 5 or 6 channels?

Thanks for the replies.

Share this post


Link to post
Share on other sites
Your sound must be mixed for 5.1 also. DirectSound just plays the sound you give it. It's mixing and mastering that produces 5.1 surround.

Share this post


Link to post
Share on other sites
True, but I'm playing 3D sounds, which have to be mono anyway, so something's up with DirectSound's mixing.

Share this post


Link to post
Share on other sites
Quote:
Original post by DrGUI

For 5.1 should I have 5 or 6 channels?

Thanks for the replies.


5.1 = 6ch(6speaker)
6.1 = 7ch(7speaker)
7.1 = 8ch(8speaker)
....
bla bla

0.1 means super woofer speaker.

BTW directsound can output over 3chnnel individual since dsound8. 5ch 6ch ....

Share this post


Link to post
Share on other sites
It's not DirectSound's mixing, it's that your sound is not mixed for 5.1. You are trying to play 5.1 surround with a 2 channel sound. It's not going to work. In your WAVEFORMATEX struct, what is the value of nChannels?

Share this post


Link to post
Share on other sites
Thanks for that katsh.

paradoxnj, I see what you mean, however a 3D sound is mono yet it is usually mixed over 2 speakers for stereo (based on its position in relation to the the listener). Thus I would expect DirectSound to likewise mix the mono sound over 5.1 channels.

edit: though the number of channels in the DX sample (Play3DSound) was originally 2, I also tried it with 5 and 6 channels, but nothing seemed to change.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!