Old 2nd January 2006, 10:03   #1
Senior Member
ulillillia's Avatar
Join Date: Feb 2002
Location: Minot, ND, USA
Posts: 381
32-bit WAV files - floating point versus integerical

Not sure where to post this, but this seems the best bet. Some of the latest WAV files have 32-bit precision. If you know programming, you should know that there are three types of 32-bit variables: float, int, and long. The more bits that are used, the greater the precision, but the more disk space and memory is used as well.

My question is, what advantages does 32-bit floating point (floats) have over 32-bit integerical (ints or longs) for WAV files? I understand that 32-bit floats have support for fractions and decimals along with exponents. I don't see what use it has for WAV files. They all have the same degree of precision. I'm just curious, that's all.

void BlueWater() {water.color=blue; while(GameRunning) {if (fox.pos == InBlueWater) {fox.air--; FoxDrown(fox.air);} else {fox.air=1800; fox.flags = WantsToGetWet; } WaitFrames(1); }} // My top favorite thing in 2D Sonic (as C)
ulillillia is offline   Reply With Quote
Old 5th January 2006, 11:22   #2
Inventive Soft
Join Date: Oct 2004
Location: Nottingham, England
Posts: 81
Integers require less processing power to decode than floating numbers. Floats should be more accurate but are more suited in audio to real-time editing than integers.
Inventive Soft is offline   Reply With Quote
Old 5th January 2006, 13:10   #3
Foorum King
gaekwad2's Avatar
Join Date: Jul 2003
Location: bar2000
Posts: 11,407
Floating point offers an almost unlimited dynamic range, and its resolution (almost) doesn't depend on volume.

Integer actually has a higher signal/noise ratio, but only at full volume.

32bit int has 192dB dynamic range and maximum s/n ratio.
32bit float has 144dB s/n ratio and 1680dB dynamic range (for 24bit mantissa/8bit exponent).
gaekwad2 is offline   Reply With Quote
Old 5th January 2006, 13:12   #4
Forum King
zootm's Avatar
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
Floats are theoretically better at representing analogue data, but all 32-bit numbers have exactly the same range of values so it's largely much of a muchness. Floating point numbers ain't good on portable devices since many don't have FPUs (which is part of the reason that you don't see a lot of hardware support for Vorbis, although there is now an integer decoder implementation).

Edit: Worth noting that I'm approaching this from the "CS" side of things, rather than the "Muso" one. The sound range or something available to float is theoretically larger, but the range of values is identical. Meaning that they both lose data at different points.

Last edited by zootm; 5th January 2006 at 13:53.
zootm is offline   Reply With Quote
Go Back   Winamp & SHOUTcast Forums > Community Center > Music O'Rama

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump