ComponentInstanceRecord from AUBase
ComponentInstanceRecord from AUBase
- Subject: ComponentInstanceRecord from AUBase
- From: Andreas Tell <email@hidden>
- Date: Wed, 18 Nov 2009 14:55:02 +0100
Dear Developers,
I'm currently writing an Audio Unit that changes the latency property during processing. Following the the documentation I'd like to issue a Property Change Notification to the host from the audio unit. Here's what I do:
AudioUnitEvent event; event.mArgument.mProperty.mPropertyID = kAudioUnitProperty_Latency; event.mArgument.mProperty.mAudioUnit = this; // <---- Bad assignment event.mArgument.mProperty.mScope = kAudioUnitScope_Global; event.mArgument.mProperty.mElement = 0; event.mEventType = kAudioUnitEvent_PropertyChange; AUEventListenerNotify (NULL, this, &event);
Unfortunately it turns out that it's not so simple. The problem is that mAudioUnit is a ComponentInstanceRecord* and this is a pointer of a class derived from AUBase. The ComponentInstanceRecord is given to the GUI upon instantiation, but I have to issue the latency change from the AU itself. I've searched the headers, docs, archive, and found no way to retrieve the component instance from the class pointer.
Is there any way to resolve this?
Thanks,
Andreas
|
_______________________________________________
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