• 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
Re: float error...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: float error...


  • Subject: Re: float error...
  • From: David DeHaven <email@hidden>
  • Date: Mon, 25 Mar 2002 12:11:58 -0600

IEEE floats are base 2 numbers, so it's not possible to precisely represent all base 10 real numbers.

You could step by 0.01 if you modified your code to round instead of truncate when fetching a parameter value.

Indeed, that's where the problem was. For some reason, I was fixated on the volume setting side of things... not the volume getting side. I added a bit of code to round properly and it works like a champ now.

-DrD-
_______________________________________________
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.

References: 
 >Re: float error... (From: Doug Wyatt <email@hidden>)

  • Prev by Date: Detecting dropouts?
  • Next by Date: Largest sample frame value causes stuttering
  • Previous by thread: Re: float error...
  • Next by thread: Detecting dropouts?
  • Index(es):
    • Date
    • Thread