'What Are Linear PCM Values

I am working with audio in the iPhone OS and am a bit confused.

I am currently getting input from my audio buffer in the form of pcm values ranging from -32767 to 32768. I am hoping to perform a dbSPL conversion using the formula 20LOG10(p/pref).

I am aware that pRef is .00002 pascals, and would like to convert the pcm values to pascals.

My question is a) what are these pcm values representing exactly. b) how do I turn these values to pascals.

Thanks so much



Solution 1:[1]

You can't do this conversion without additional information. The mapping of PCM values to physical units of pressure (pascals) depends on the volume setting, characteristics of the output device (earbuds? a PA system?), and the position of the observer with respect to the output device (right next to the speaker? 100 meters away?).

To answer the first part of your question: if you were to graph the sound pressure versus time for, say, a 1 kHz sine wave tone, the linear-quantized PCM values at the sample times would be roughly proportional to the sound pressure variations from ambient at that instant. ("Roughly", because input and output devices seldom have absolutely flat response curves over the entire audio frequency range.)

Solution 2:[2]

Your question is neither “iphone”, “objective-c” or “objective-c++”. But it can be answered very simple: http://en.wikipedia.org/wiki/Pulse-code_modulation

Greetings

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Objective Interested Person