shithub: opus

Download patch

ref: a8734e0fd90c652dcf731cd51aadb00015bc92e0
parent: 888d8ce9397df6ca1c4a256d8f44eac6249869b3
author: Jean-Marc Valin <[email protected]>
date: Thu May 21 18:29:09 EDT 2009

Proper use of SCALEIN() as suggested by John Ridges

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -158,7 +158,7 @@
 
 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);