• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AUEventListenerNotify and property changes in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUEventListenerNotify and property changes in Leopard


  • Subject: Re: AUEventListenerNotify and property changes in Leopard
  • From: William Stewart <email@hidden>
  • Date: Mon, 28 Jan 2008 19:06:03 -0800


On Jan 28, 2008, at 7:00 PM, William Stewart wrote:


On Jan 26, 2008, at 1:45 AM, Eric Gorouben wrote:

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.

No you don't.

If the property is changing, then your AU should be initiating the property change, not your AU.

I mean not your view :)





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?

In your AU, you call the PropertyChanged method


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.

hmm... so if I understand it, you want to notify your view that a note just started?


So, in the RealTimeStartNote implementation in your AU, you make the AUBase::PropertyChanged call. Your view will then receive a notification that the property it is interested in has changed, and it can go and get the new value(s)

Does that make sense?

Bill
_______________________________________________
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

_______________________________________________ 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
References: 
 >AUEventListenerNotify and property changes in Leopard (From: Eric Gorouben <email@hidden>)
 >Re: AUEventListenerNotify and property changes in Leopard (From: William Stewart <email@hidden>)

  • Prev by Date: Re: AUEventListenerNotify and property changes in Leopard
  • Next by Date: AUEventListenerNotify and property changes in Leopard
  • Previous by thread: Re: AUEventListenerNotify and property changes in Leopard
  • Next by thread: Re: AUEventListenerNotify and property changes in Leopard
  • Index(es):
    • Date
    • Thread