Re: AUEventListenerNotify paramErr for PropertyChange events on Leopard
Re: AUEventListenerNotify paramErr for PropertyChange events on Leopard
- Subject: Re: AUEventListenerNotify paramErr for PropertyChange events on Leopard
- From: William Stewart <email@hidden>
- Date: Wed, 5 Dec 2007 18:46:40 -0800
Sohia
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). That said, we will look into this (as there's nothing
here that looks obviously wrong to me)
Bill
On Dec 5, 2007, at 6:04 PM, Sophia Poirier [dfx] wrote:
I am experiencing a problem with AUEventListenerNotify() only in
Leopard (10.5.1 specifically). It seems that, no matter how I try
to do it, I am always getting paramErr returned from
AUEventListenerNotify() when I try to do a
kAudioUnitEvent_PropertyChange event. A basic example from an
AUEffectBase-derived AU for me is looking something like this:
AudioUnitEvent auEvent = {0};
auEvent.mEventType = kAudioUnitEvent_PropertyChange;
auEvent.mArgument.mProperty.mAudioUnit = GetComponentInstance();
auEvent.mArgument.mProperty.mPropertyID = somePropertyID;
auEvent.mArgument.mProperty.mScope = kAudioUnitScope_Global;
auEvent.mArgument.mProperty.mElement = 0;
OSStatus status = AUEventListenerNotify(NULL, NULL, &auEvent);
I am getting -50 (paramErr) returned always. I started seeing this
with custom property IDs, so I tried using some of the AU standard
ones and saw the same results. I then tried experimenting with not
making the first two arguments NULL (sometimes making both not NULL,
sometimes just trying to do that with one of them), and still always
paramErr. When I say experimented with those, I mean that I created
an AUEventListenerRef object successfully and passed the resulting
one and the same "refcon" object to the call to
AUEventListenerNotify(), but still no success.
However, if I go and try doing almost identical code but with a
kAudioUnitEvent_ParameterChange event type, then I get 0 (noErr)
returned.
I'm trying my best but simply can't find anything that I might be
doing wrong, so I'm wondering: Has anything changed in the Leopard
implementation of AUEventListenerNotify() that might explain this?
Am I possibly doing something incorrectly that Leopard is more
stringent in handling? Or is there possibly a bug with this in
Leopard?
thanks,
Sophia
_______________________________________________
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