Proper use of SCALEIN() as suggested by John Ridges

This commit is contained in:
Jean-Marc Valin 2009-05-21 22:29:09 -04:00
parent 888d8ce939
commit a8734e0fd9

View file

@ -158,7 +158,7 @@ void celt_encoder_destroy(CELTEncoder *st)
static inline celt_int16_t FLOAT2INT16(float x)
{
x = x*32768.;
x = SCALEIN(x);
x = MAX32(x, -32768);
x = MIN32(x, 32767);
return (celt_int16_t)float2int(x);