[Speex-dev] Sound distorted after normalized.

illiminable ogg at illiminable.com
Tue Dec 28 22:53:14 PST 2004


Hmmm... sorry i mislead you Tay... i didn't realise my encoder 
(libfishsound) was again shifting the data i gave it back to being 32767 
based internally.

Zen.
----- Original Message ----- 
From: "Jean-Marc Valin" <Jean-Marc.Valin at USherbrooke.ca>
To: "Tay YueWeng" <yueweng at yahoo.com>
Cc: "speex" <speex-dev at xiph.org>
Sent: Wednesday, December 29, 2004 1:04 PM
Subject: Re: [Speex-dev] Sound distorted after normalized.


> 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.

No. Speex expects values in the +-32767 range, not +-1.0. Just
converting from int16 to float *is* the right thing to do.

Jean-Marc

-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke

_______________________________________________
Speex-dev mailing list
Speex-dev at xiph.org
http://lists.xiph.org/mailman/listinfo/speex-dev






More information about the Speex-dev mailing list