Skip to content

Commit

Permalink
tests/check/elements/audioresample.c: avoid implict int ot float conv…
Browse files Browse the repository at this point in the history
…ersion

Also use doubles instead so the calculation won't overflow

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/773>
  • Loading branch information
alatiera committed Aug 4, 2020
1 parent 31d683d commit 66ff1ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/check/elements/audioresample.c
Expand Up @@ -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,
Expand Down

0 comments on commit 66ff1ee

Please sign in to comment.