This article is free part of http://blog.csdn.net/droidphone
1. What is PCM?
PCM is the abbreviation of Pulse-code modulation. We know that in real life, the voice heard by human ears is a analog signal. PCM is a technology that converts the voice from analog to digital signal, his principle is simply to use a fixed frequency to sample the analog signal. The sampled signal is like a series of continuous pulses with different amplitude on the waveform, quantifies the amplitude of these pulses based on a certain degree of accuracy. These quantified values are continuously output, transmitted, processed, or recorded in the storage media, all of these constitute the digital audio generation process.
Figure 1.1 sampling and quantification of analog audio
Two important indicators of PCM signal are sampling frequency and quantization accuracy. Currently, the sampling frequency of CD audio is usually 44100Hz, and the quantization precision is 16 bit. Normally, when playing music, the app reads audio data from the storage medium (MP3, WMA, AAC ......), after decoding, the PCM data is finally sent to the audio driver. In turn, during the recording, the audio driver continuously sends the sampled PCM data back to the application, compress and store tasks by applications. Therefore, the two core tasks of the audio driver are:
- How does playback convert PCM data sent by user space applications into analog audio that can be recognized by human ears?
- Capture is an application that collects and quantifies mic analog signals, converts them to PCM signals, and sends them back to the user space.
PCM concept in audio