Re: Playing wave file data
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.