Re: How to Notify parameters changes
Re: How to Notify parameters changes
- Subject: Re: How to Notify parameters changes
- From: Marc Poirier <email@hidden>
- Date: Sun, 20 Apr 2003 17:44:34 +0200 (CEST)
On Sat, 12 Apr 2003, Shai Shasag wrote:
>
>You need to mark the beginning and ends of parameter change gestures using
>
>AudioUnitCarbonViewEventListener with
>
>kAudioUnitCarbonViewEvent_MouseDownInControl and
>
>kAudioUnitCarbonViewEvent_MouseUpInControl
>
>
>
>See AUCarbonViewBase and AUCarbonViewControl in the SDK for example
>
>implementations.
>
>
Thanks Marc,
>
>
kAudioUnitCarbonViewEvent_MouseDownInControl calls
>
mOwnerView->TellListener(mParam,
>
kAudioUnitCarbonViewEvent_MouseDownInControl, NULL);
>
>
Which in turn calls the AUCarbonViewBase ::mEventListener call back
>
passing it a pointer to the AUVParameter of the control.
>
>
This is strange, why would the call back need a pointer to something
>
that is completely internal to the control? In my case I do not even
>
have a control and it's AUVParameter, what should I send?
If you're not using those Apple SDK base classes, then you should just
ignore those implementations that are specific to those classes and simply
using your own AudioUnitCarbonViewEventListener callback function. The
last argument (inEventParam) can be void. The first argument (inUserData)
is what the listener passes along to you from the
AudioUnitCarbonViewSetEventListenerSelect.
Look in AudioUnit.framework AudioUnitCarbonView.h for just the raw API
stuff (not the convenience implementations in the AUCarbonViewWhatever
classes) and you'll see:
typedef CALLBACK_API_C( void , AudioUnitCarbonViewEventListener )(void
*inUserData, AudioUnitCarbonView inView, const AudioUnitParameter
*inParameter, AudioUnitCarbonViewEventID inEvent, const void
*inEventParam);
and
enum {
kAudioUnitCarbonViewEvent_MouseDownInControl = 0,
kAudioUnitCarbonViewEvent_MouseUpInControl = 1
};
which is the stuff you need to be dealing with.
Marc
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.