Re: Problem with AudioUnitAdd/RemovePropertyListener
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