32-bit WAV files - floating point versus integerical

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ulillillia
    Senior Member
    • Feb 2002
    • 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)
  • Inventive Soft
    Member
    • Oct 2004
    • 81

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

    Comment

    • gaekwad2
      Foorum King
      • Jul 2003
      • 11462

      #3
      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).

      Comment

      • zootm
        Forum King
        • Jan 2002
        • 13375

        #4
        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; 5 January 2006, 12:53.

        Comment

        Working...
        X