Re: AudioUnits and parameter info change
Re: AudioUnits and parameter info change
- Subject: Re: AudioUnits and parameter info change
- From: Marc Poirier <email@hidden>
- Date: Mon, 3 Feb 2003 20:41:47 +0100 (CET)
Hi Franck.
>
I have a small question regarding audiounits...I'd like to be able to
>
change a parameter info while the audio unit is running and to tell the
>
host to update the default view (like if i discover the host has no
>
transport informations, i hide a parameter that deals with transport
>
and change the unit of another)...has anyone done this? any thoughts?
The AU API has this beautiful system where everything is a property.
Entities external to the AU who have knowledge of the component instance
can install property listeners on any properties that they are interested
in. When a property in an AU changes, the AU can announce that change to
all listeners (without knowing anything about the listeners) via the
NotifyListener mechanism.
So to put it in practical terms, if you change your parameter list, then
do this:
PropertyChanged(kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, 0);
If you change your parameter info, do this:
PropertyChanged(kAudioUnitProperty_ParameterInfo, kAudioUnitScope_Global, 0);
(change the scope and element arguments if necessary, although it probably
isn't unless you're doing anything fancy)
Then the only issue is whether or not the entity who you want to be
listening (in this case the default view) is listening. If the thing has
not installed property listeners for those properties, then the best thing
to do would probably be to contact the author about this.
>
because for the host and tempo proc it seems that even when the host
>
has transport information i can only know it after i publish my
>
parameter list.
I'm sorry, I don't follow that. Could you explain what you're saying a
little more?
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.