summaryrefslogtreecommitdiff
path: root/tests/check
diff options
context:
space:
mode:
authorJordan Petridis <jordan@centricular.com>2020-08-03 19:53:58 +0300
committerJordan Petridis <jordan@centricular.com>2020-08-04 17:32:31 +0300
commit66ff1eedcae40d763ed02fec3e3c313e19629cbf (patch)
tree61ef00bc1581b79df9799f4900459ef47c9b5bd9 /tests/check
parent31d683d59e4b48401b915c90588afa0fed20f029 (diff)
downloadgstreamer-plugins-base-66ff1eedcae40d763ed02fec3e3c313e19629cbf.tar.gz
tests/check/elements/audioresample.c: avoid implict int ot float conversion
Also use doubles instead so the calculation won't overflow Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/773>
Diffstat (limited to 'tests/check')
-rw-r--r--tests/check/elements/audioresample.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/check/elements/audioresample.c b/tests/check/elements/audioresample.c
index 793594b6b..d48d0fa65 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,