Proper use of SCALEIN() as suggested by John Ridges
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 22 May 2009 02:29:09 +0000 (22:29 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 22 May 2009 02:29:09 +0000 (22:29 -0400)
libcelt/celt.c

index 1de0ced..b07e682 100644 (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);