• 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
indexed parameter rounding problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

indexed parameter rounding problem


  • Subject: indexed parameter rounding problem
  • From: Urs Heckmann <email@hidden>
  • Date: Sun, 12 Jan 2003 01:29:28 +0100

Hi,

I just encountered a problem with indexed AU parameters.

If you set them min = 0.f, max = 22.f, the value for 13.f will arrive at AUBase::SetParameter() set at 12.99999f which, when casted to int, makes 12!!! I think people usually will cast indexed parameter values to integers for control structures like switch and for, so it might turn out to be a good idea to use roundf to get propper values. I think this comes from AUCarbonViewControl::GetValueFract() which deals with double precision values which somewhen later convert to 32bit floats. Or is my FP mechanic in my ancient 7400 faulty?

Cheers,

;) Urs



urs heckmann
email@hidden
www.u-he.com

Why I create audio plugins instead of using them?
Here's the answer: www.u-he.com/music/
_______________________________________________
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: Things not to do in a thread (was Re: Leak while in Midi thread)
  • Next by Date: Sample AUs not registering
  • Previous by thread: Re: Leak while in Midi thread
  • Next by thread: Sample AUs not registering
  • Index(es):
    • Date
    • Thread