Re: 16-Bit Stereo PCM Standard?

Jason Daly <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
Patrick M. Rutkowski wrote:
> But then what exactly is it that they do output? How is the PCM sample
> "1843" converted into a decibel value for output? Is there some
> standard that defines how all this happens? Or is it just an accident
> that the data output by libmad can be conveniently input into
> alBufferData()?
>   

Hi, Patrick,

Welcome to the world of digital audio!  :-)

Essentially, each sample value you see in the PCM stream is converted by 
a DAC (digital to analog converter) to a voltage on the wire going to 
your speakers or headphones.  In 16-bit PCM, you typically use signed 
16-bit values, so you can think of it this way:  a value of 0 means the 
speaker's cone is centered, or at "rest", a value of -32768 means the 
speaker's cone is pushed into the cabinet as far as it can go, and a 
value of 32767 means it is pushed out of the cabinet as far as it can go.

This explanation is probably a bit oversimplified, but it should at 
least give you an idea of what's going on.  8-bit PCM is similar 
(although 8-bit samples are typically unsigned, so 0-256, instead of 
-32768 to 32767).  You can also have 24-bit samples, or even 32-bit 
integer or floating point samples.  Each format has an effect on the 
quality of the final sound, essentially, the more bits you use, the more 
discrete levels of amplitude are available, and the more faithfully the 
original sound can be modeled and reproduced.  Of course, there are 
other factors that affect the overall audio quality, including the 
sample rate and the audio hardware itself.

Hope this helps...

--"J"

_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.