Jump to content
  • Advertisement
Sign in to follow this  

Multiple DirectSound device objects in one application

This topic is 4728 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

I have a sound card with multiple in/out. In windows it registers as 4 input and 4 output devices. From control panel I can choose which device is default playback device and send wave to that output only. That works just fine. My idea is to write DirectSound application that will be able to play different sounds to all outputs simultaniously. My idea was to create one DirectSound device object for each device registered by windows and play sounds simultaniously that way. Unfortunately, I ran into some problems. I have succesfully extended Microsoft playsound example from DirectSound SDK to create 4 different SoundManager objects for each device (each SoundManager object is initialized with correct device GUI). I have also created one static sound buffer for each device and tried to play them all. Unfortunatelly, nothing happens. No errors, just no sound from any outputs. When I modified the code to initialize only one device the playback was just fine. It doestn't matter which output, it plays just fine as long as there is only one CSoundManager in my app. When I have two or more, nothing happens. No change in code, just multiple CSoundManagers. My question is: is it possible to have multiple DirectSound device objects in single application in order to control multiple sound cards? Am I doing something wrong? Thanks in advance.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!