From 0e7b430f6f7a66bcdbe5f62357c28c2de3aaf083 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Thu, 8 Aug 2019 08:03:29 +1000 Subject: [PATCH] src_float_to_short_array: Use division instead of shift --- src/samplerate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/samplerate.c b/src/samplerate.c index ca81b66a..21a19a26 100644 --- a/src/samplerate.c +++ b/src/samplerate.c @@ -510,7 +510,7 @@ src_float_to_short_array (const float *in, short *out, int len) continue ; } ; - out [len] = (short) (lrint (scaled_value) >> 16) ; + out [len] = (short) (lrint (scaled_value) / 0x10000) ; } ; } /* src_float_to_short_array */