AUEventListenerNotify paramErr for PropertyChange events on Leopard
AUEventListenerNotify paramErr for PropertyChange events on Leopard
- Subject: AUEventListenerNotify paramErr for PropertyChange events on Leopard
- From: "Sophia Poirier [dfx]" <email@hidden>
- Date: Wed, 5 Dec 2007 21:04:36 -0500
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