• 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: William Stewart <email@hidden>
  • Date: Mon, 21 May 2007 14:47:16 -0700

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

Bill

On 16/05/2007, at 1:24 PM, Bjorn Roche wrote:


On May 16, 2007, at 4:11 PM, Mark Pauley wrote:

You should do a quick search of this list ( I think it's archived online somewhere). Lots of questions have been answered before.

William Stewart said:

Instead of calling SetParameter, you should call AUParameterSet (<AudioToolbox/AudioUnitUtilities.>) - its nearly as simple :)

AUParameterSet appears to be a wrapper around SetParameter that also fires an event off, have you tried that?



Yes, I am aware of the difference between AUParameterSet and AudioUnitSetParameter. The question is why AudioUnitSetProperty ( ... kAudioUnitProperty_PresentPreset, ... ) seems to fire events (at least the GUI responds to changes) whereas AudioUnitSetParameter doesn't. I know I CAN fire events off with AUSetParameter, but I'm unclear why the functions from AudioUnit.h seem to have different behaviors (as opposed to functions from AudioUnitUtilities.h).


This seems inconsistent, but as I said, it's immaterial at this point, because I decided to fire events manually with my own wrapper function.

	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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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


  • Follow-Ups:
    • Re: AudioUnit Events
      • From: Bjorn Roche <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>)

  • Prev by Date: Re: Audio Unit render problem
  • Next by Date: Re: Core Audio and Java
  • Previous by thread: Re: AudioUnit Events
  • Next by thread: Re: AudioUnit Events
  • Index(es):
    • Date
    • Thread