Re: AUParameterValueFromLinear?
Re: AUParameterValueFromLinear?
- Subject: Re: AUParameterValueFromLinear?
- From: William Stewart <email@hidden>
- Date: Mon, 1 Dec 2003 16:49:30 -0800
The only way I can see this happen by glancing through the code is the
following:
if (info.flags & kAudioUnitParameterFlag_DisplayLogarithmic)
(ie. the flags for this parameter have the displayLogarithmic flag set)
Otherwise, I'm at a loss to explain this
Bill
On 22/11/2003, at 1:27 PM, Jeremy Sagan wrote:
>
AUParameterValueFromLinear seems to be converting a parameter whose
>
type is kAudioUnitParameterUnit_Indexed to an exponential scale. Is
>
this a bug?
>
>
The following code does not work correctly without the else clause
>
(although it should not be needed):
>
>
if (GetAudioUnitParamInfo(AU, &data, parm) == noErr)
>
{
>
if (kAudioUnitParameterUnit_Indexed != data.AUPI.unit)
>
value = MyParameterValueFromLinear(value, &data.AUP); //this calls
>
to AUParameterValueFromLinear
>
else
>
{// do linear mapping manually since AUParameterValueFromLinear
>
doesn't work right
>
value = (value) * (data.AUPI.maxValue - data.AUPI.minValue) +
>
data.AUPI.minValue;
>
value = floor(value + 0.5);
>
}
>
}
>
return (value);
>
>
Jeremy
>
_______________________________________________
>
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.
>
>
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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.