16-Bit Stereo PCM Standard?

"Patrick M. Rutkowski" <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
Hi there guys,

I'm very very (and very again) new to audio programming. I only just
yesterday learned the basic of PCM data formats, and there are still a
lot of unanswered questions.

Firstly, I'm playing with OpenAL by having libmad read mp3 data out of
my song files. The sample code shipped with libmad passes signed
16-bit PCM data back to the developer, so I went with
AL_FORMAT_STEREO16 when feeding the libmad output into alBufferData().
Somehow it just worked, and the song plays fine.

But what I'm confused about is how OpenAL transforms the stream of
16-bit PCM samples into the decibels which come out of the speakers. I
mean, say for example that one of the PCM samples has the value 1843,
and that the stream's frequency is 700 samples per second. Surly it
can't be that the speakers output 1843db for that 1/700th of a second,
because that would be insane! :-)

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()?
_______________________________________________
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.