Proper use of SCALEIN() as suggested by John Ridges
This commit is contained in:
parent
888d8ce939
commit
a8734e0fd9
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ void celt_encoder_destroy(CELTEncoder *st)
|
||||||
|
|
||||||
static inline celt_int16_t FLOAT2INT16(float x)
|
static inline celt_int16_t FLOAT2INT16(float x)
|
||||||
{
|
{
|
||||||
x = x*32768.;
|
x = SCALEIN(x);
|
||||||
x = MAX32(x, -32768);
|
x = MAX32(x, -32768);
|
||||||
x = MIN32(x, 32767);
|
x = MIN32(x, 32767);
|
||||||
return (celt_int16_t)float2int(x);
|
return (celt_int16_t)float2int(x);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue