AUEventListenerNotify and property changes in Leopard
AUEventListenerNotify and property changes in Leopard
- Subject: AUEventListenerNotify and property changes in Leopard
- From: Eric Gorouben <email@hidden>
- Date: Sat, 26 Jan 2008 10:45:48 +0100
Hi, there
1) I've seen in a previous thread that property changes should not be
notified through AUEventListenerNotify. I need to issu a property
changed notification from my AUCarbonViewBase to my AU.
This works fine in Tiger:
void CGui::myNotify(){
AudioUnitEvent myEvent;
myEvent.mEventType = kAudioUnitEvent_PropertyChange;
myEvent.mArgument.mProperty.mAudioUnit = GetEditAudioUnit ();
myEvent.mArgument.mProperty.mPropertyID =
kAudioUnitProperty_MyProperty;
myEvent.mArgument.mProperty.mScope = kAudioUnitScope_Global;
myEvent.mArgument.mProperty.mElement = 0;
OSStatus err=AUEventListenerNotify(NULL,NULL,&myEvent);
fprintf(stderr,"myNotify err=%d\n",err);
}
But result, of course, is -50 in Leopard
Bill Stewart:
We normally don't expect the ListenerNotify to be called from
property changes, so that could be why you are seeing a discrepancy
here
and
You shouldn't need to make this call from within an AU - all you
need to do there is call the AUBase::PropertyChanged method (which
in turn will turn around and call of the registered property change
listeners iwth the AU).
But, from my AUCarbonViewBase, I can't call PropertyChanged.
What is the way to send a property changed notification from the view
to the AU?
I try to follow Cynthia Maxwell's advice:
All you are looking to do is send a notification to your AU from
your view to call AUMonotimbralInstrumentBase ::RealTimeStartNote,
which then tells your note to Render.
You can do that via a property changed notification and pass along a
stuct with the key and velocity info.
2) Following the same advice, how can I "...pass along a stuct ..."
Thanks
Eric
_______________________________________________
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