Re: SDK Available
Re: SDK Available
- Subject: Re: SDK Available
- From: Airy André <email@hidden>
- Date: Mon, 28 Apr 2003 23:11:01 +0200
old issues still unresolved:
I never noticed this before, but I was thinking, shouldn't the
~AUEffectBase and ~AUCarbonViewControl destructors be virtual?
The one inherited is declared as virtual, so it should be OK.
...
In AUCarbonViewControl::ParamToControl and
AUCarbonViewControl::ControlToParam, there is still the bad assumption
being made that a control for a parameter that supplies ValueStrings
is a
pop-up menu control:
if (mParam.HasNamedParams())
do tweaks for pop-up menus;
I've brought this up before, but another reminder: This is a bad bad
assumption! There is a way to properly check if the control is a
pop-up
menu and that proper method should be used instead:
ControlKind ctrlKind;
if ( (GetControlKind(mControl, &ctrlKind) == noErr) &&
(ctrlKind.kind == kControlKindPopupButton) )
do tweaks for pop-up menus;
I agree. This is also a problem with one of my AUs.
I changed it to :
if (kind.kind == kControlKindPopupArrow || kind.kind ==
kControlKindPopupButton)
...
new problems:
AUVPresets::AUVPresets() should use SetControl32BitMaximum, not
SetControlMaximum. Other than that, the SDK code has been fully
migrated
to 32Bit control style, so far as I can see.
Yes, and it seems to work fine for the first tests I did.
...
In AUBase::DispatchGetPropertyInfo the handling of FactoryPresets and
ParameterValueStrings has been tweaked, as described in SDKDiffs.rtf,
to
handle NULL input to query whether or not the property is supported:
case kAudioUnitProperty_FactoryPresets:
require(inScope == kAudioUnitScope_Global, InvalidScope);
result = GetPresets(NULL);
if (!result) {
outDataSize = sizeof(CFArrayRef);
outWritable = false;
}
break;
case kAudioUnitProperty_ParameterValueStrings:
result = GetParameterValueStrings(inScope, inElement, NULL);
if (result == noErr) {
outDataSize = sizeof(CFArrayRef);
outWritable = false;
validateElement = false;
}
break;
But shouldn't there be handling of the case when the properties are not
supported, like I see for other properties, something like:
case kAudioUnitProperty_FactoryPresets:
require(inScope == kAudioUnitScope_Global, InvalidScope);
result = GetPresets(NULL);
if (!result) {
outDataSize = sizeof(CFArrayRef);
outWritable = false;
}
else
goto InvalidProperty;
break;
case kAudioUnitProperty_ParameterValueStrings:
result = GetParameterValueStrings(inScope, inElement, NULL);
if (result == noErr) {
outDataSize = sizeof(CFArrayRef);
outWritable = false;
validateElement = false;
}
else
goto InvalidProperty;
break;
Well, if you don't support these properties, I suppose you don't
override the default implementation, which returns
kAudioUnitErr_InvalidProperty.
So, result == kAudioUnitErr_InvalidProperty
Airy
_______________________________________________
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.