Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it correct to assume that floating-point samples in a WAV or AIFF file will be normalized?

Tags:

People also ask

What's the difference between WAV and AIFF?

WAV: The main differences. AIFF and WAV play on almost all kinds of computers and devices, though AIFF works mostly for Macs, while WAV is for Windows. The two audio formats employ the same type of encoding that results in large file sizes, but have a better quality sound compared to MP3 and M4V.

Should I export as WAV or AIFF?

WAV is mostly used for PCs and AIFF being used mostly for MAC, but either can be played on virtually all types of computers and devices. Both use the same type of encoding that results in a relatively large file size, but a maintaining a higher quality sound than mp3 m4a or other smaller files.

Is it a good decision to choose AIFF file format to save the audio?

As a general rule of thumb, I recommend you choose one Uncompressed Lossless audio format (AIFF or WAV) and one Compressed Lossy audio format (M4A or MP3). That way, regardless of what kind of format you need, you have it ready and you don't have to re-open your session just to re-bounce the song in a new format.

What is a floating point file?

Single-precision floating-point format (sometimes called FP32 or float32) is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.


Say I have a program that reads a .WAV or .AIFF file, and the file's audio is encoded as floating-point sample-values. Is it correct for my program to assume that any well-formed (floating-point-based) .WAV or .AIFF file will contain sample values only in the range [-1.0f,+1.0f]? I couldn't find anything in the WAV or AIFF specifications that addresses this point.

And if that is not a valid assumption, how can one know what the full dynamic range of the audio in the file was intended to be? (I could read the entire file and find out what the file's actual minimum and maximum sample values are, but there are two problems with that: (1) it would be a slow/expensive operation if the file is very large, and (2) it would lose information, in that if the file's creator had intended the file to have some "headroom" so as not play at dbFS at its loudest point, my program would not be able to detect that)