DirectSound-Utilizing Mulitple Hardware Outputs

Unanswered DirectSound-Utilizing Mulitple Hardware Outputs

  • Tuesday, January 10, 2012 9:27 PM
     
     
    I have a USB audio interface that has no inputs and eight outputs. The outputs are in no particular configuration (i.e. 7.1 or 5.1 or stereo pairs, etc.). It's really intended to be used as eight individual outputs, each output playing a monaural sound independently of the others. How can I use the Managed DirectSound API to, for example, play a mono .wav file on output 2, and a different mono .wav file on output 5 simultaneously?  I've been using C#, but an example in any language would be very much appreciated.
     
    Thanks for your help.

All Replies

  • Friday, January 13, 2012 10:55 AM
     
     
    The outputs are likely to be available as individual audio output devices ,and you have choices of APIs to use to play audio through. This is DirectShow forum and you can definitely use DirectShow (through DirectShow.NET library if you want C# though). Other options include WASAPI, VFW (waveOut* functions), DirectSound. Any API includes choices for device to play through.
    http://alax.info/blog/tag/directshow
  • Friday, January 13, 2012 1:55 PM
     
     
    Thanks for your reply.  Using DirectSound, I have not seen this to be the case.  As far as I can tell, devices are accessed by the physical card.  I was hoping there was some way (using DirectSound) that I could not only treat each physical card as a separate output, but each physical output independently of one another.  And, in fact, I know there is a way because I have a purchased application that does it.  It occurs to me that this may not be the correct forum for this question (sorry about that).  I'll start looking, but can you suggest a more appropriate forum?  Thanks again for your response.
  • Friday, January 13, 2012 3:12 PM
     
     

    Well, you have DirectSoundEnumerate which is supposed to get you the devices. If you only have one device there, perhaps it's multichannel, such as 8 channels on a single device?

    Anyway, if you keep in mind that in recent operating systems DirectSound is nothing but a legacy compatibility layer, why don't you enumerate WASAPI devices and check if you have a better device list there. You can do it easily with the following tool: Utility Clearance: Enumerate Audio ‘MMDevice’s.


    http://alax.info/blog/tag/directshow
  • Friday, January 13, 2012 3:18 PM
     
     
    I'll check into this a little later, and post back if I get anywhere.  Thanks.