• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AUParameterValueFromLinear?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AUParameterValueFromLinear?


  • Subject: AUParameterValueFromLinear?
  • From: Jeremy Sagan <email@hidden>
  • Date: Sat, 22 Nov 2003 16:27:33 -0500

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.

  • Prev by Date: Re: Accessing user interface from ioProc
  • Next by Date: Re: coreaudio-api digest, Vol 2 #940 - 9 msgs
  • Previous by thread: Re: MusicDevice mono/stereo
  • Next by thread: Re: coreaudio-api digest, Vol 2 #940 - 9 msgs
  • Index(es):
    • Date
    • Thread