From 28a1e108b35ef8f0157ac126cf00c75daba90264 Mon Sep 17 00:00:00 2001 From: Martin Linklater Date: Sun, 28 Nov 2021 20:54:44 +0000 Subject: [PATCH] Fix double promotion warning --- 32blit/audio/minimp3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/32blit/audio/minimp3.h b/32blit/audio/minimp3.h index 4b045a984..3a18b5ca4 100644 --- a/32blit/audio/minimp3.h +++ b/32blit/audio/minimp3.h @@ -1422,8 +1422,8 @@ static int16_t mp3d_scale_pcm(float sample) s32 -= (s32 < 0); int16_t s = (int16_t)minimp3_clip_int16_arm(s32); #else - if (sample >= 32766.5) return (int16_t) 32767; - if (sample <= -32767.5) return (int16_t)-32768; + if (sample >= 32766.5f) return (int16_t) 32767; + if (sample <= -32767.5f) return (int16_t)-32768; int16_t s = (int16_t)(sample + .5f); s -= (s < 0); /* away from zero, to be compliant */ #endif