Re: AudioUnit : how to communicate from DSP to GUI ?
Re: AudioUnit : how to communicate from DSP to GUI ?
- Subject: Re: AudioUnit : how to communicate from DSP to GUI ?
- From: Benjamin Golinvaux <email@hidden>
- Date: Fri, 11 Oct 2002 18:07:41 +0200
I have added this in my overridden GetProperty call in the AUBase
subclass :
ComponentResult MyEffectAUClass::GetProperty(
AudioUnitPropertyID iID,
AudioUnitScope iScope,
AudioUnitElement iElem,
void* pData)
{
....
else if(iID==kArboretumAudioUnitProperty_GetPluginCPPInstance)
{
void** pThis = (void**)(pData);
*pThis = (void*)this;
return noErr;
}
return AUEffectBase::GetProperty(iID, iScope, iElem, pData);
}
This is needed too :
ComponentResult MyEffectAUClass::GetPropertyInfo(
AudioUnitPropertyID iID,
AudioUnitScope iScope,
AudioUnitElement iElem,
UInt32& iSize, Boolean& fWritable)
{
....
else if (iID== kArboretumAudioUnitProperty_GetPluginCPPInstance)
{
iSize=sizeof(void*);
return noErr;
}
return AUEffectBase::GetPropertyInfo(iID, iScope, iElem, iSize,
fWritable);
}
Then, in my CreateUI call, where i need the AUBase instance address, i
do this :
void* pluginAddr;
UInt32 dataSize = sizeof(pluginAddr);
ComponentResult err = AudioUnitGetProperty(
mEditAudioUnit,
kArboretumAudioUnitProperty_GetPluginCPPInstance,
kAudioUnitScope_Global,
0,
&pluginAddr,
&dataSize);
MyEffectAUClass* audioUnitInstance = (MyEffectAUClass*)pluginAddr;
And then I can access the CPP instance from the view class....
J'esphre que ga va t'aider ;-)
Benjamin Golinvaux
Arboretum Systems, Inc.
www.arboretum.com
On Friday, October 11, 2002, at 01:43 PM, email@hidden
wrote:
>
Hi,
>
>
What is the supported way with AudioUnit SDK to make a tunnel
>
communication from an AudioUnit and an AudioUnit View ? I have some
>
values that are calculated at different stage of the dsp processing,
>
not only at output stage, and I have to pass it to my GUI code to make
>
some leds blink.
>
Is there a way to make my AudioUnit view gives a pointer to the
>
AudioUnit dsp and vice-versa ?
>
>
(I have search the archive but I couldn't find the solution. I'm
>
surprised that the question was not asked)
>
>
Thanks,
>
>
Raphael
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.