[Concept]
The PCM (Pulse Code Modulation) Audio Encoding format is also calledPulse Coding Modulation. It is to convert analog signals such as sound into a symbolic pulse column, and then store records.
Principle]
A continuous analog signal with continuous values is transformed into a discrete time. The Discrete digital signal is then transmitted in the channel. pulse coding modulation is the process of first sampling the analog signal, then quantifying the sample value amplitude.
SamplingThat is, periodic scanning of analog signals converts consecutive time signals into discrete time signals. after sampling, the analog signal should also contain all information in the original signal, that is, the original analog signal can be restored without distortion. the lower limit of the sampling rate is determined by the sampling theorem. in this experiment, the sampling rate is 8 kbit/s.
QuantizationThat is, the instantaneous values obtained after sampling are discrete, that is, the instantaneous sampling value is represented by the nearest level value using a set of defined levels. after a simulated signal is sampled and quantified, a quantified pulse amplitude modulation signal is obtained, which is only a finite number.
EncodingA group of binary code groups is used to represent each quantified value with a fixed level. however, quantization is actually completed in the encoding process at the same time. Therefore, the encoding process is also called a modulo/number transformation, which can be recorded as A/D.
[Features]
PCM signals are not encoded or compressed (Lossless Compression). Compared with analog signals, it is not affected by the clutter and distortion of the transmission system. The dynamic range is wide and the sound quality is quite good.
On the Windows platform, PCM-based WAV is the best supported audio format, and all audio software can support it perfectly. Because it can meet high sound quality requirements, wav is also the preferred format for Music Editing and creation, and is suitable for saving music clips. Therefore, PCM-based WAV is used as an intermediary format and is often used in the conversion of other encodings, such as MP3 to WMA.
[Storage]
Single-channel files,The sampled data is stored in chronological order. (Its basic organizational unit is byte (8bit) or word (16bit )).
Dual-channel filesThe sampling data is stored in chronological order. :
Each sample value of PCM is included in an integer I. The length of I is the minimum number of bytes required to accommodate the specified sample length.
First, the storage of low valid bytes indicates that the bit of the sample amplitude is placed on the high valid bit of I, and the remaining position is 0.
Reference: http://blog.csdn.net/ownWell/article/details/8114121