[wdmaudiodev] Re: MultiChannel Handling

  • From: "David A. Hoatson" <dhoatson@xxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 15 May 2006 10:58:11 -0700

Hello,
  Hi everybody,

  I'm using Direct KS, in a client application to capture audio from an audio 
Device.
  I have some questions and some problem to handle multichannel hardware:
  I tried on Edirol USB device and MOTU firewire device. 
  With the Motu, i can create a capture pin with 8 channels (my motu have 8 
analog input and output).
  I can also create a render pin with 8 channels. 
  I would like to be able to capture individual channel or render on individual 
channel.
  I understand that i have to capture all channels and read the one i want to 
deal with,
  or render all channels sending audio data on channels i want to use, and 
silence on the others.
  That's right?
Right - unless the audio device has mutiple filters for each channel.
  I tried to render in this way, but i get signal on all channels.
If you render to a multichannel pin with only one channel having valid data (an 
all the other channels sending silence), then you shouldn't be seeing signal on 
all channels.  Have you checked to make sure you are doing the interleave of 
the audio data correctly?
  I used the dwChannelMask also but it doesn't seem to work anyway.
  I'm not sure with my method. Could you please tell me more about that,
  or give me some link where i can find info? I can send you more code if
  needed.
You need to make sure you set WaveFormatPCMEx.dwChannelMask AND 
WaveFormatPCMEx.Format.nChannels correctly as both are used in the 
DataRangeIntersection.
  Also How can i know how many output or input channels has a device?
Overall or for a specific pin?
  And how can i determine if inputs are analog or digital?
There really isn't much of a standard way of doing this.  You can see what kind 
of pin is exposed (the name), but most devices don't set the name 'correctly' 
to tell the app if the pin is analog or digital.  Do some exploring with 
KsStudio and you can see the filter structure of the device in question and the 
names associated with the pins.
  Thanks in advance,
  emilie
Good luck!

David A. Hoatson

Other related posts: