[Speex-dev] converting unsigned short sample to signed short sample

Steve Checkoway s at pahtak.org
Wed Mar 14 08:58:34 PDT 2012


On Mar 14, 2012, at 8:13 AM, Mashal al-shboul wrote:

> Thanks for replying.
> actually 2^15 in decimal is the same as 0x8000 in hex.

Right. 2^15 = 0x8000 = 32768, not 32767.

> the idea is clear for me that i should scale down each unsigned sample by 0x8000 for becoming signed. I hope that will work correctly as input raw samples to Speex codec. do you think so ?

Did you try it?

-- 
Stephen Checkoway







More information about the Speex-dev mailing list