Re: kMusicDeviceProperty_InstrumentCount
Re: kMusicDeviceProperty_InstrumentCount
- Subject: Re: kMusicDeviceProperty_InstrumentCount
- From: Marc Poirier <email@hidden>
- Date: Fri, 31 Oct 2003 17:08:45 -0600 (CST)
On Thu, 30 Oct 2003, Craig Bakalian wrote:
>
Hi,
>
Yes, Okay. I got it. I was guessing at the parameters for the
>
AudioUnitGetProperty call. I didn't understand the scope and element
>
bit yet, now I do. Thanks for the help. And for future reference,
>
how does one know the kAudioUnitScope_ type based upon the AudioUnit.
>
Where would I find this information? The same for the element
>
parameter.
Yeah, good question. You're kind of hitting upon what I think is
unfortunately one of the major shortcomings in the AU API docs, which is
missing some details on scope and element usage. Basically, scope and
element are very much context specific, so their usage depends on which
property you are dealing with. What I wish is that the docs would specify
for each and every property exactly what scope and element mean in that
context, and also whether any values are illegal for that property, or if
the values are irrelevant for that property. But currently, it's not very
well specified.
One thing that can be helpful, though, is to look in the AU SDK sources
and see the default handling for a given property in there. For some
properties, you'll see stuff like this:
require(inScope == kAudioUnitScope_Global, InvalidScope);
which shows you that only global scope is valid. Also, you can see for
some things if the scope and/or element is simply ignored, which is the
case for some properties.
There are some general tendencies, though. For stuff dealing with the
audio i/o, Input and Output scopes tend to have a pretty obvious meaning.
And then Global would mean both. In a lot of cases, only Global scope is
valid since other scopes don't have a useful meaning in those contexts.
Element is usually used to specify a bus, when it's used. Sometimes it's
used to specify a parameter ID. Often it's unused.
In the case of kMusicDeviceProperty_InstrumentCount, I think that element
is unused, but I'm not positive about that.
Marc
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.