• 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: AudioUnit Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioUnit Events


  • Subject: Re: AudioUnit Events
  • From: Bjorn Roche <email@hidden>
  • Date: Mon, 21 May 2007 19:42:46 -0400


On May 21, 2007, at 5:47 PM, William Stewart wrote:

When you set a property, the AU itself will issue a property notification. It does this during the call to SetProperty. You can listen for property changes in one of two ways:
(1) recommended - use AUEventListener to make sure that you always get notified of a property change on the thread you want to respond to it on (for instance, you typically want to get these notifictions on your main/UI thread)
(2) instantiate a listener directly with the AU for property changes (this is what AUEventListener does as part of the work it does for you)


Parameters are different.

When a host sets a parameter it has two jobs to do:
(1) Set the parameter
(2) Tell others that the parameter has been changed (we don't expect the AU to have to do this)


AUParameterSet does both jobs for you - the event listener also has both object and inClientData parameters - these are used by the listener mechanism to ensure that you don't have circular notifictions. So, when you call AUParameterSet (or the EventListenerNotify calls) you provide the client data/object members that you used to create the listener with - that way it won't notify you that you just changed its value!

There is a technote that I think explains all this as well so that might help

Thanks for the clarifications, that's very useful.

If you are refering to technote 2104, I don't think it covers the circular notification issue, and this difference between parameters and properties wasn't clear to me from reading it, though maybe I was being dense. (If there's another technote you could direct me to I'd very much appreciate it)

While we're on the issue of technote 2104, listing 5 contains a typo:

AUEventListenerCreate(MyPropertyListener,
                                NULL,
                                runLoop,
                                loopMode,
                                100,
                                100,
                                &MyListener);

should read something more like:

AUEventListenerCreate(MyPropertyListener,
                                NULL,
                                runLoop,
                                loopMode,
                                .100,
                                .100,
                                &MyListener);

(of course it'll "work" the first way, but you'll wonder what happened to your events.)

Thanks again William,

	bjorn


----------------------------- Bjorn Roche XO Wave Digital Audio Production and Post-Production Software http://www.xowave.com http://blog.bjornroche.com http://myspace.com/xowave


_______________________________________________ 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: 
 >AudioUnit Events (From: Bjorn Roche <email@hidden>)
 >Re: AudioUnit Events (From: Bjorn Roche <email@hidden>)
 >Re: AudioUnit Events (From: Mark Pauley <email@hidden>)
 >Re: AudioUnit Events (From: Bjorn Roche <email@hidden>)
 >Re: AudioUnit Events (From: William Stewart <email@hidden>)

  • Prev by Date: Re: Ghost list?
  • Next by Date: ExtAudioFileRead Min Buffer Size
  • Previous by thread: Re: AudioUnit Events
  • Next by thread: converting buffer channels
  • Index(es):
    • Date
    • Thread