Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AUEventListenerNotify and property changes in Leopard



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:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.