[Openal] Can someone explain signed vs. unsigned audio samples to me?

Peter Mulholland darkmatter at blueyonder.co.uk
Thu Aug 28 12:52:33 PDT 2008


Hello Kyle,

Thursday, August 28, 2008, 8:24:27 PM, you wrote:

> Not specific to OpenAL, but I thought I'd ask here.

> I can't figure out how signed audio samples work. What is silence? 0? -MAX?

> If 0 is silent, then is 1 the same as -1? If -MAX, then what is the difference between signed and unsigned?

For signed 8 bit:
Silence would be 0. Full positive would be 127. Full negative would be -128.

For unsigned 8 bit:
Silence would be 127. Full positive would be 255. Full negative would be 0.

Similarly with 16 bit signed: 0 is silence, 32767 is full +ve, -32768 is full -ve.
16 bit unsigned: 32767 silence, 65535 full +ve, 0 full -ve

-- 
Best regards,
 Peter                            mailto:darkmatter at blueyonder.co.uk



More information about the Openal mailing list