• 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: Playing wave file data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Playing wave file data


  • Subject: Re: Playing wave file data
  • From: Herbie Robinson <email@hidden>
  • Date: Wed, 15 Oct 2003 18:39:57 -0400

At 4:07 PM -0400 10/15/03, Steve Bird wrote:
--- There *-IS-* some math behind this - don't just make up a number. If it's 16-bit sound, it has a range of -32768..+32767. So divide (using floating-point arithmetic) the sound integers by 32767 to get +/- 1.00000.

Actually, you want to multiply by the constant (1.0 / 32768.0) because multiplies are much much faster than divides and because if you use 32767, you can end up with a sample greater than -1. Another reason to multiply by a power of 2 is because that way you don't mess up any dither that has been added to the 16 bit samples.
--
-*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
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: Playing wave file data
      • From: William Stewart <email@hidden>
References: 
 >Re: Playing wave file data (From: Steve Bird <email@hidden>)

  • Prev by Date: Re: Playing wave file data
  • Next by Date: Re: magic cookies
  • Previous by thread: Re: Playing wave file data
  • Next by thread: Re: Playing wave file data
  • Index(es):
    • Date
    • Thread