• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Meta Parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Meta Parameters


  • Subject: Re: Meta Parameters
  • From: "P. Grütter" <email@hidden>
  • Date: Fri, 11 Apr 2008 10:04:19 +0200

Hi Bill,
unfortunately I still have some problems. Everything works fine when I change parameters in my custom view. When a meta parameter is changed in my custom view I set the dependent parameters and then call AUParameterSet() for the meta parameter. But I don't know how to get it working when the meta parameter is changed in the generic view or with a control surface. When my listener gets notified about the meta parameter change it's too late to set all the dependent parameters because the notification for them is already fired. I need to know about my meta parameter change BEFORE the listener gets notified about the change. You wrote:


In your AU:
When paraemter 1 is changed, you just go and internally set the new values to parameter's 2 and 3. There's no reason and you shouldn't from your AU, be calling AUParameterSet
When you are finished with the parameter 1 change, your AU's values for parameter 2,3 should also be at their new / correct values

How do I know that parameter 1 is changed before the listenener gets notified? I tried to use the kAudioUnitEvent_BeginParameterChangeGesture but that's not fired for boolean parameters in the generic view :-( Is there any method I haven't found yet?
Thanks, Paul




Am 7. Apr 2008 um 23:14 Uhr schrieb William Stewart:

On Apr 5, 2008, at 1:49 AM, P. Grütter wrote:
Hi Bill,

no - it will evaluate the parameters and send notifications if they have changed. By describing what the dependent parameters are, it allows this mechanisms to have a shorter search path.

I've made this test and I don't see where the mechanism evaluates the dependent parameters:


I've set the meta parameter flag for my master parameter and defined three dependent parameters for that meta parameter. When I change the meta parameter the listener gets always notified for the meta and the dependent parameters (thus four times), whether I have changed the dependent parameters or not.

No - auval will fail your AU because you have incorrectly marked one of your parameters.

I've made this test and my plugins passes auval:

I didn't set any meta parameter flag (and didn't define dependent parameters) but called AUParameterSet() for every parameter I'd like to change after a change of my master parameter. The listener gets notified for all these parameters (thus four times). So I don't see the difference between these two ways.

Where are you calling AUParameterSet from?



Also, the intention of this mechanism is that the AU itself doesn't have to do this notification as its not setting a parameter value, just responding to it being set on it.


My AU does set the dependent parameters when it notices the change of the master parameter, where else should I put this mechanism?

What do you mean? "when it notices the change"

I think you are doing too much. Here is what you do:

Declare parameter 1 as meta-parameter
Declare that parameter 2,3 are dependent on parameter 1

In your AU:
When paraemter 1 is changed, you just go and internally set the new values to parameter's 2 and 3. There's no reason and you shouldn't from your AU, be calling AUParameterSet
When you are finished with the parameter 1 change, your AU's values for parameter 2,3 should also be at their new / correct values


In your view:
When you want to change paraemter 1, call AUParameterSet **JUST** on parameter 1- that will trigger all of the notification code to look out for changes to your dependent parameters as well as parameter 1


I have to make sure that it'll work with automation or control surfaces even when the view is closed.
Am I missing something obvious?

Yes, you are doing too much I think

Bill

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Meta Parameters (From: "P. Grütter" <email@hidden>)
 >Re: Meta Parameters (From: "Kevin Dixon" <email@hidden>)
 >Re: Meta Parameters (From: William Stewart <email@hidden>)
 >Re: Meta Parameters (From: "P. Grütter" <email@hidden>)
 >Re: Meta Parameters (From: William Stewart <email@hidden>)
 >Re: Meta Parameters (From: "P. Grütter" <email@hidden>)
 >Re: Meta Parameters (From: William Stewart <email@hidden>)

  • Prev by Date: Re: terminating thread operation
  • Next by Date: built-in (DLS) equivalent of QTMA instruments?
  • Previous by thread: Re: Meta Parameters
  • Next by thread: kAudioQueueParam_Volume having no effect
  • Index(es):
    • Date
    • Thread