Re: Music Device and channel handshake
Re: Music Device and channel handshake
- Subject: Re: Music Device and channel handshake
- From: William Stewart <email@hidden>
- Date: Mon, 31 Jan 2005 14:40:46 -0800
On 31/01/2005, at 1:31 PM, Makira wrote:
0 for a channel count is not a valid value
Bill
Just took a look at
/Developer/Examples/CoreAudio/Documentation/AudioUnits/
IOChannelConfiguratio
ns.rtf
Let me quote:
[...]
Current Usage
Value Meaning
0 a particular number of channels
0 no audio input (or output) is supported - in this case the audio
element count on that scope would also be zero.
-1 wild card to mean any number of channels
-2 wild card used in conjunction with the -1 wild card, to mean any
number of channels.
Some Examples
Value Meaning
{ 1, 2 } 1 channel of input, 2 channels of output
{ 0, 2 } No inputs, 2 channel outputs. If this was the only channel
info
published, the AU would be expected to have zero input elements with an
audio data format
[...]
Yes - but now you are talking about something different.
A zero here is a value in the SupportedNumChannels argument.
Seb's posting was about setting a Stream format where the number of
channels field is set to zero.
So I guess you mean it's not a valid value to set ? Meaning a -1 or -2
value
means any positive value excluding zero? The documentation could be
clearer.
The docs here I think are very clear.
Zero is nothing - how can it be either positive or negative?
Also, about SetProperty(StreamFormat, input) returning always false,
from
the SDK:
AUBase.h :: 697
case kAudioUnitProperty_StreamFormat:
{
if (inDataSize < 36) goto InvalidPropertyValue;
require(GetElement(inScope, inElement) != NULL, InvalidElement);
[...]
require(ValidFormat(inScope, inElement, newDesc), InvalidFormat);
[...]
}
Since it appears ValidFormat is never called, then it's GetElement that
fails, which makes sense since a music instrument has no input element.
Correct - but even so, setting a stream format with a num channels == 0
is not sensible.
Bill
Antoine
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden