From 66ff1eedcae40d763ed02fec3e3c313e19629cbf Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Mon, 3 Aug 2020 19:53:58 +0300 Subject: [PATCH] tests/check/elements/audioresample.c: avoid implict int ot float conversion Also use doubles instead so the calculation won't overflow Part-of: --- tests/check/elements/audioresample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/check/elements/audioresample.c b/tests/check/elements/audioresample.c index 793594b..d48d0fa 100644 --- a/tests/check/elements/audioresample.c +++ b/tests/check/elements/audioresample.c @@ -1172,8 +1172,8 @@ FILL_BUFFER (double, sine, sin (i * 0.01)); FILL_BUFFER (double, sine2, sin (i * 1.8)); FILL_BUFFER (gint16, sine, (gint16) (32767 * sinf (i * 0.01f))); FILL_BUFFER (gint16, sine2, (gint16) (32767 * sinf (i * 1.8f))); -FILL_BUFFER (gint32, sine, (gint32) (2147483647 * sinf (i * 0.01f))); -FILL_BUFFER (gint32, sine2, (gint32) (2147483647 * sinf (i * 1.8f))); +FILL_BUFFER (gint32, sine, (gint32) (2147483647.0 * sin (i * 0.01))); +FILL_BUFFER (gint32, sine2, (gint32) (2147483647.0 * sin (i * 1.8))); static void run_fft_pipeline (int inrate, int outrate, int quality, int width, -- 2.7.4