
This section describes how different computing platforms store PCM audio data and any format identifiers they use. Platform-Specific PCM Identifiers And Characteristics The size of the quantization step is varied to allow further reduction of the required bandwidth for a given signal-to-noise ratio. This reduces the number of bits required per audio sample by about 25% compared to PCM. Values are encoded as differences between the current and the previous value. A-law coding uses the format number 0x06 is Microsoft multimedia files and the fourcc 'alaw' in Apple Quicktime files.Įvery byte of a log PCM data chunk maps to a signed 16-bit linear PCM sample. Mu-law coding uses the format number 0x07 in Microsoft multimedia files (WAV/AVI/ASF) and the fourcc 'ulaw' in Apple Quicktime files. There are two major variants of log PCM: mu-law (u-law) and A-law. Log PCM is more often used in telephony and communications applications than in entertainment multimedia applications. Rather than representing sample amplitudes on a linear scale as linear PCM coding does, logarithmic PCM coding plots the amplitudes on a logarithmic scale. However, some applications which demand higher precision will store and process PCM samples using floating point numbers.įloating-point PCM samples (32- or 64-bit in size) are zero-centred and varies in the interval, thus signed values. Most PCM formats encode samples using integers. Frequency is measured in samples/second (Hz). This parameter measures how many samples/channel are played each second. In some rare cases, usually when optimized for special playback hardware, chunks of audio destined for different channels will not be interleaved. If there is more than one channel, the channels will almost always be interleaved: Left sample, right sample, left, right, etc., in the case of stereo interleaved data. If the PCM type is monaural, each sample will belong to that one channel.
WAV VS PCM SERIES
In very rare cases, signed PCM audio is represented as a series of sign/magnitude coded numbers. If a PCM type is signed, the sign encoding is almost always 2's complement. If the sample is signed, the sample range is -128.127 with a centerpoint of 0. If the sample is unsigned, the sample range is 0.255 with a centerpoint of 128. Whether the sample is signed or unsigned is needed to understand the range. It is not enough to know that a PCM sample is, for example, 8 bits wide. Due to the widespread use of little-endian Intel CPUs, little-endian PCM tends to be the most common byte orientation. When more than one byte is used to represent a PCM sample, the byte order (big endian vs.
WAV VS PCM 64 BITS
Some king-sized formats even opt for 32 and 64 bits per sample. Other sizes, such as 12, 20, and 24 bits, are occasionally seen. The most common values are 8 bits (1 byte), which gives a range of 256 amplitude steps, or 16 bits (2 bytes), which gives a range of 65536 amplitude steps. This parameter specifies the amount of data used to represent each discrete amplitude sample. PCM audio is coded using a combination of various parameters. TODO: add some basic theory and pictures explaining PCM for the uninitiated PCM Parameters
