[wdmaudiodev] Re: WaveFormatExtensible - problems about the number of channels

  • From: Waldemar Haszlakiewicz <waldemar.haszlakiewicz@xxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 20 Jun 2003 02:44:10 +0200

1st
I've looked at directSound samples (FullDuplexFilter):-->

GetWaveFormatFromIndex( iIndex, &wfx );
// To test if a playback format is supported, try to set the format
// using a specific format.  If it works then the format is
// supported, otherwise not.

In GetWaveFormatFromIndex it sets the number of channels too.


I don't think you can just get the number of channels from the card.
Why?
Because on some cards if you open 1 channel at 96kHz you loose the ability
to open 2 at 48kHz.

So it depends what kind of a channel you open.
This is what is happening in the driver:
1st find a native format of a driver
2nd open channel
3rd test other formats
4th close

So in this way you can get the number of channels supported at current
format(sample rate, bit rate,..).

For this testing I would first try to get the KSDATARANGE_AUDIO struct
from the driver, but I don't know if you can get it for directSound
->you can for directKS.


2nd
>>IMV The only idea I've got, was to query the MME driver for the
>>IMV> number of channels using the "waveOutGetDevCaps". However, for ALL
>>IMV> soundcards that I've tested it (SoundBlaster Audigy, Midiman, onboard 
>>ones,
>>IMV> etc), the "lpCaps.wChannels" always reports 65536 (0xFFFF) or 2 
>>channels.
0xFFFF - this could mean that number of channels can't be defined
until you open a channel -> the upper 96kHz->48kHz problem.

Again you need to test if format is supported.


I hope that this helped. And please fix me if I'm wrong.

Waldemar







IMV> Hi !

IMV> Well, that didn't help me at all. For example, I have a computer with a 
IMV> Midiman Delta 1010 LT.

IMV> The DirectKS reports that I have 1 (ONE) device:
IMV> - Midiman Delta 1010LT - 12 in / 10 out

IMV> The point is that I want to use the DirectSound, NOT the DirectKS.
IMV> So, DirectSound does NOT report 1 device, but 6:
IMV> - M Audio Delta 1010LT Multichannel (which has 12 outputs)
IMV> - M Audio Delta 1010LT 1/2 (2 outputs, just a simple stereo DS device)
IMV> - M Audio Delta 1010LT 3/4 (2 outs)
IMV> - M Audio Delta 1010LT 5/6 (2 outs)
IMV> - M Audio Delta 1010LT 7/8 (2 outs)
IMV> - M Audio Delta 1010LT S/PDIF (2 outs)

IMV> So, I will need somehow, to get the number of input/output channels for 
EACH 
IMV> of this DirectSound devices. The DirectKS, sees all the above as a SINGLE 
IMV> device (which from the physical point of view is correct)

IMV> So, please anybody if you can help me with this ...

IMV> VIM.


>>Date: Sun, 15 Jun 2003 22:55:16 +0200
>>From: Waldemar Haszlakiewicz <waldemar.haszlakiewicz@xxxxxxxx>
>>Subject: [wdmaudiodev] Re: WaveFormatExtensible - problems about the number 
>>of
>>
>>Check the old board messages->there is an example for directks. Maybe
>>it includes something about that too.
>>
>>Look for directks.exe.
>>
>>Waldemar
>>
>>
>>IMV> Hi !
>>
>>IMV> I'm new to this group, so please be patient with me. First of all, I 
>>don't
>>IMV> do driver development, but I write the audio I/O for a professional
>>IMV> multitrack software. We currently support MME, DirectSound and ASIO. 
>>We want
>>IMV> to support the WDM style multichannel soundcards (that don't have an 
>>ASIO
>>IMV> driver). To do so, we use the WaveFormatExtensible structure in 
>>DirectSound.
>>IMV> I've managed (very simple) to output to several channels using the 
>>WAVE_EX,
>>IMV> but I have a __MAJOR__ problem. I don't know how to get the real 
>>number of
>>IMV> channels the soundcard has. I found no information everywhere about 
>>this
>>IMV> (I've checked on the Internet, PortAudio and other forums, the DirectX 
>>9
>>IMV> SDK, etc). The only idea I've got, was to query the MME driver for the
>>IMV> number of channels using the "waveOutGetDevCaps". However, for ALL
>>IMV> soundcards that I've tested it (SoundBlaster Audigy, Midiman, onboard 
>>ones,
>>IMV> etc), the "lpCaps.wChannels" always reports 65536 (0xFFFF) or 2 
>>channels.
>>
>>IMV> Because I don't know how to get the actual number of the channel the 
>>device
>>IMV> has, I just can't use the WAVE_EX struct.
>>
>>IMV> So PLEASE, if anybody has any idea about this, please reply. I do 
>>believe
>>IMV> that this is the only place on the Internet where I can get the answer 
>>for
>>IMV> this.
>>
>>
>>IMV> VIM
>

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: