• 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: Problem with AudioUnitAdd/RemovePropertyListener
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with AudioUnitAdd/RemovePropertyListener


  • Subject: Re: Problem with AudioUnitAdd/RemovePropertyListener
  • From: William Stewart <email@hidden>
  • Date: Mon, 18 Dec 2006 12:58:33 -0800

There's a couple of notes to make here.

On 16/12/2006, at 10:17 AM, Brett George wrote:

The view would be a bad place to have these property listeners. You
should have another class which always runs regardless of which windows
are open, and that class should update the contents of the windows based
on AU property changes.

The view should be using the AUEventListener for property changes as well - it provides a service to dispatch the property change to your main/UI thread. Property change notifications are always delivered on the thread they are issued on - so to make sure this is safe to do UI work on, it is worthwhile to funnel all property changes response through the UI thread using this API to achieve that.



Brett.

Ian Kemmish wrote:


There appears to be a problem with the way these routines are specified.


ComponentResult AudioUnitAddPropertyListener(
  AudioUnit                      ci,
  AudioUnitPropertyID            inID,
  AudioUnitPropertyListenerProc  inProc,
  void *                         inProcRefCon
);

ComponentResult AudioUnitRemovePropertyListener(
  AudioUnit                      ci,
  AudioUnitPropertyID            inID,
  AudioUnitPropertyListenerProc  inProc
);


The key to the problem is that the combination of inID and inProc is not always sufficient to uniquely identify a particular listener.

Yes - we have a new API in Leopard to address exactly this problem - the clientData is specified as part of the remove call


Thanks

Bill

--
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


References: 
 >Problem with AudioUnitAdd/RemovePropertyListener (From: Ian Kemmish <email@hidden>)
 >Re: Problem with AudioUnitAdd/RemovePropertyListener (From: Brett George <email@hidden>)

  • Prev by Date: Re: Same Devices to one Mac
  • Next by Date: Re: Same Devices to one Mac
  • Previous by thread: Re: Problem with AudioUnitAdd/RemovePropertyListener
  • Next by thread: Same Devices to one Mac
  • Index(es):
    • Date
    • Thread