Commit d2ff0942 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix wrong implicit cast

parent 2b288902
...@@ -51,10 +51,10 @@ static void FilterS32N (audio_volume_t *vol, block_t *block, float volume) ...@@ -51,10 +51,10 @@ static void FilterS32N (audio_volume_t *vol, block_t *block, float volume)
for (size_t n = block->i_buffer / sizeof (*p); n > 0; n--) for (size_t n = block->i_buffer / sizeof (*p); n > 0; n--)
{ {
int64_t s = *p * (int64_t)mult; int64_t s = *p * (int64_t)mult;
if (s >= (INT32_MAX << INT64_C(24))) if (s >= ((int64_t)INT32_MAX << INT64_C(24)))
*p = INT32_MAX; *p = INT32_MAX;
else else
if (s < (INT32_MIN << INT64_C(24))) if (s < ((int64_t)INT32_MIN << INT64_C(24)))
*p = INT32_MIN; *p = INT32_MIN;
else else
*p = s >> INT64_C(24); *p = s >> INT64_C(24);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment