For audio to be understood by a computer it must be 'encoded' into an audio file. This process involves taking an analogue audio signal and converting it into a string of code that can be understood (digital). This article will review the basics of audio file formats.
TABLE OF CONTENTS
Digital Audio Basics
The encoding process converts continuous signals into discrete values. 'Snapshots' of the audio signal are taken at set frequencies. These snapshots are called samples and the frequency is called the 'sample rate'. The standard sample rate for high-quality audio is either 48000 or 44100 samples per second. The 'accuracy' of these samples is determined by the bit depth (usually 16, 24 or 32). The higher the sample number, the higher the quality of the audio and larger the file size.
PCM (Pulse-Code Modulation) is the name given to the uncompressed process, as a file format you will see PCM files under the wrapper of .WAV or .AIFF/aif (optimised for Apple computers).
PCM is the truest representation of audio you can find in the digital realm. However, as it is uncompressed the file sizes are often very large. For streaming purposes, uncompressed audio would be unfeasible because of the bandwidth required to send and receive it.
Lossy Formats
Rather than PCM formats, which are large in size and impractical for sending over the internet, compressed audio files are preferable for streaming. Compression (not to be confused with the audio process of compression) reduces the size of an audio file and can be either a lossy or lossless process. Lossy processes mean some data is lost in the process while lossless compression can reduce file sizes without compromising the data sizes. For streaming, however, lossy formats are most often used because they are the smallest files and generally sound good enough to use.
The most common forms of lossy compression are .MP3 and .AAC. The goal of MP3 is three-fold: 1) to drop all the sound data that exists beyond the human hearing range, 2) reduce the quality of sounds that aren’t easy to hear, and 3) to compress all other audio data as efficiently as possible.*
The compression algorithm used by AAC is much more advanced and technical than MP3, so when you compare the same recording in MP3 and AAC formats at the same bitrates, the AAC one will generally have better sound quality.
For more information about AAC Encodings, read our explainer article.
*Source quoted: https://www.makeuseof.com/tag/audio-file-format-right-needs/