Important Upcoming Changes to AudioUnit Parameter handling
Important Upcoming Changes to AudioUnit Parameter handling
- Subject: Important Upcoming Changes to AudioUnit Parameter handling
- From: Bill Stewart <email@hidden>
- Date: Fri, 15 Feb 2002 15:18:54 -0800
I know Chris is planning on responding to this, but I also wanted to make
sure that you guys understood some changes that we're making to how we
expect audio units to behave in the future.
In 10.1, if you ask any of our built-in audio units for their parameter
lists or info in any scope but the global scope, the unit returns an error.
We now consider this to be incorrect.
In the future ALL of our audio units will define parameters on the scope to
which they are applied. In the AudioUnitSDK this has already been rewritten
to reflect that change.
For applications dealing with AU, it is a simple change you can do now to
make sure you will continue to work with the new (and vastly better:) way.
Always ask for parameter list in all of the scopes (Global, Input and
Output). If you get back an error, then that means that there are no
parameters in that scope.
When you find a parameter list in a particular scope, then you can get the
information list for each parameter in the list and you should do that IN
THE SAME SCOPE that you retrieved the list from.
That's it (in the soon to be perfect world)...
For compatibility in the imperfect world.
When you are getting the parameter list in the global scope, the existing
audio units will set flags in the parameter info each of them return that
currently tell you what scope they are actually applied to. So, you should
look at the flags and determine if a scope bit is set in the flags - then
that will tell you what scope the parameter should be applied to when
calling it.
After some thought we realised (too late) that this was kind of hacked up
and wanted to tighten this. Thus the need for the change.
The use of the flags field for scope is no longer needed (and won't be
provided in future releases with our units).
If you want to test your code with both, you can get the au SDK from the web
site and check that it works with both an example from that code and the
existing units in the OS.
BTW - The Java update is nearly done, so shortly we will be adding to the
SDK a tool that presents a UI to manipulate AUGraphs, AudioUnits, the
sequencing tool box, etc... Its been quite a delay, so thanks for your
patience.
Bill
on 15/2/02 2:01 PM, John Cramp wrote:
>
I'm trying to use AudioUnitSetParameter to set some of the options on the
>
built-in reverb audio unit, and I must be doing something wrong because it
>
doesn't seem to be working.
>
>
First, I use AudioUnitGetProperty with kAudioUnitProperty_ParameterList, and
>
then AudioUnitGetProperty with kAudioUnitProperty_ParameterInfo to get the
>
list of parameters that the reverb audio unit supports.
>
>
So, as an example, "decay time" has a parameter ID of 0, min value of .1, and
>
max value of 5. I see by the flags that it is in the global scope and both
>
readable and writable.
>
>
If I try to do the following, however, it doesn't seem to be working:
>
theStatus = AudioUnitSetParameter(reverbAU, 0, kAudioUnitScope_Global, 0,
>
[sender floatValue], 0);
>
>
When I say "doesn't seem to be working," I mean that I can't hear any
>
difference between the max value, the min value, or anything in between. (The
>
same goes for all the other properties.) There are no errors reported from the
>
calls as far as I can tell.
>
>
The things that I think might be wrong in that call are the inElement value,
>
and the inBufferOffsetInFrames (arguments 4 and 6). Should they be something
>
other than zero?
>
>
If anyone has ideas on why this isn't working, I would appreciate hearing
>
about it.
>
>
--john
>
_______________________________________________
>
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.
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"We'll talk about it later...."
"When?"
"In a future life when we're both cats"
__________________________________________________________________________
_______________________________________________
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.