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

float error...


  • Subject: float error...
  • From: David DeHaven <email@hidden>
  • Date: Mon, 25 Mar 2002 09:51:08 -0600

Found an issue with volume control some of you should probably be aware of:

I was stepping the volume by 0.01 when using the keyboard to control volume. Well, when it hit 0.52 or 0.58, it would stop, for no apparent reason. Then I looked at the actual values: 0.53 and 0.59 do _not_ exist in the 32 bit floating point world. They are 0.529999971 and 0.589999974 respectively. Somewhere along the lines (either in the default AudioOutputUnit or in the driver itself), the last 7 digits are being cropped so the volume doesn't change (or at least the value returned from the AudioUnit doesn't change).

My solution was to step by 0.02 instead, which seems to work just fine.

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

  • Follow-Ups:
    • Re: float error...
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: MP audio output
  • Next by Date: Re: float error...
  • Previous by thread: Re: MP audio output
  • Next by thread: Re: float error...
  • Index(es):
    • Date
    • Thread