Re: notifying host of parameter changes
Re: notifying host of parameter changes
- Subject: Re: notifying host of parameter changes
- From: Marc Poirier <email@hidden>
- Date: Sun, 23 Oct 2005 11:52:25 -0400
On Oct 22, 2005, at 4:36 AM, Muon Software Ltd - Dave wrote:
The second one is whatever you want. The listener mechanism uses the
object param to determine which code is sending the notification, so
it *doesn't* notify senders of something they've originated.
I didn't have much success experimenting late last night. I just
couldn't
get automation recorded in Logic at all.
Is there any particular reason why one would choose
AUEventListenerNotify as
opposed to AUParameterListenerNotify for this type of usage?
Nope - the event listener is an extension (think of a sub-class) of
the parent (base-class) parameter listener. It was added to deal with
parameter begin/end gestures and property changes. You can use the
older API call with the newer object.
Have tried it both ways - with a parameter listener and an event
listener
(and with a NULL/non-NULL second parameter), still no joy.
I think what I'm having the problem with is getting a reference to the
host's listener (the first parameter). How can I get hold of this
reference?
is it handled entirely by the carbon view base class?
You don't get a hold of it. Look at what the AUEventListenerNotify()
docs say:
inSendingListener
A parameter listener generating the change and which does not
want to receive a callback as a result of it. May be NULL.
So that's for if you have your own event listener installed and you
don't want the notification coming back to that listener (because you
already know about the change). The OS handles all of the installed
event listeners for you. Just send out the notification and forget
about it. Remember, there could be any number of listeners installed
on a given AU event. If you don't have your own event listener, or
if you do but don't care if it gets notified by your changes, then
pass NULL for that argument.
If you would like to see some relatively simple example code, you can
look at:
http://destroyfx.org/extras/#rmsbuddy
One thing that makes parameter change gestures a sorta annoying part
of AU is that there was an old system (now deprecated) and a newer
system (introduced with Panther, I think). If you're testing with an
older version of Logic, it may be one that doesn't support the newer
system. So, I'm not sure if we're at the point yet where we can just
forget about the old system. You'll see, if you look at the example
that I mention above, that I generate notifications for both
systems. This is probably going to continue to be a good idea for a
while still.
Marc
_______________________________________________
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