Re: AU view not appearing
Re: AU view not appearing
- Subject: Re: AU view not appearing
- From: Art Gillespie <email@hidden>
- Date: Thu, 28 Nov 2002 04:03:08 -0500
On 11/28/02 3:11 AM, "Mark Woollard" <email@hidden> wrote:
>
Any pointers to things that would stop my view class getting called?
Did you put the necessary code in your AU class to let the client know about
your view component? If GetPropertyInfo and GetProperty don't respond to
the kAudioUnitProperty_GetUIComponentList selector, the client will display
its default view and your view's constructor and CreateUI method will never
be invoked. E.g.
ComponentResult MyAU::GetPropertyInfo(AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32 & outDataSize,
Boolean & outWritable) {
if (inID == kAudioUnitProperty_GetUIComponentList) {
//tell the host about our MUI component descriptor
outDataSize = sizeof(ComponentDescription);
outWritable = false;
return noErr;
} else
return MusicDeviceBase::GetPropertyInfo(inID, inScope,
inElement, outDataSize, outWritable);
}
...and...
ComponentResult MyAU::GetProperty(
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void* outData
)
{
if (inID == kAudioUnitProperty_GetUIComponentList) {
//tell the host about our mui
ComponentDescription *cd = static_cast<ComponentDescription
*>(outData);
cd->componentType = kAudioUnitCarbonViewComponentType;
cd->componentSubType = 'fbar'; //must match our view subtype
from the .r file
cd->componentManufacturer = '0xBA'; //ibid.
cd->componentFlags = 0;
cd->componentFlagsMask = 0;
return noErr;
} else
return MusicDeviceBase::GetProperty(inID, inScope, inElement,
outData);
}
...
Hope that's helpful.
Best,
Art
>
>0xBA
_______________________________________________
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.