[Speex-dev] Sound distorted after normalized.

Erik de Castro Lopo erikd-100 at mega-nerd.com
Tue Dec 28 19:54:02 PST 2004


On Tue, 28 Dec 2004 19:49:34 -0800 (PST)
Tay YueWeng <yueweng at yahoo.com> wrote:

> 
> Dear all, 
> 
> First, my aim is to achieve VoIP using VBR and DTX
> under Win32.
> I face a problem using speex 1.0.4 and need some help.
> 
> My voice is ok and no background noise when I do NOT
> normalize 16 bit value to floating value. Normalized
> means dividing the 16 bit value by 32767.

16 bit ints have a range of -32768 to 32767. If you divide
-32768 by 32767.0 you end up with -1.00003051850948 which
is a bad thing.

Try normalizing with a value of 32768.0.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam at mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"OS X is great that way.  I put a copy of OS X on my coffee table,
and it hasn't been hacked yet. Yes, I am using it as a server. I
serve several meals on it every week." -- Anthony Minkoff


More information about the Speex-dev mailing list