On Aug 4, 2006, at 4:42 PM, Marc Poirier [dfx] wrote: Hmmm interesting... I also have always thought that the generic AUView didn't show the clump names, only the little boxes around the parameter clumps, but indeed it does show them with the AUMultibandCompressor. But not with my AUs. And so far as I can tell, I am implementing the property stuff for it correctly, and auval shows that it finds the clump names fine, yet the generic AUView does not. An example is KTGranulator which I ported to AU (an easy example cuz it has no custom GUI):
So I'm kinda puzzled. Has anyone else encountered this same problem? Any ideas?
Following the advice of Bill Stewart, this is what I did in my code, it seems to work with AULab. What I was misunderstanding is the meaning of the the outData parameter which is indeed in that case an ioData. It's a pointer to a AudioUnitParameterNameInfo structure which contains at input the clump id, and at output the clump name.
ComponentResult MyMusicDevice::GetProperty(AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElem, void* outData) { switch (inID) { case kAudioUnitProperty_ParameterClumpName: { if (inScope != kAudioUnitScope_Part) return kAudioUnitErr_InvalidScope; AudioUnitParameterNameInfo &info = *((AudioUnitParameterNameInfo *)outData); UInt32 clump_id = info.inID; if (clump_id >= MAX_CLUMP_ID) return kAudioUnitErr_InvalidParameter; CFRetain(TheClumpName[clump_id - 1]); info.outName = TheClumpName[clump_id - 1]; return noErr; } } return AUInstrumentBase::GetProperty(inID, inScope, inElem, outData); }
Philippe Wicker
|