Skip to content

Commit

Permalink
Merge pull request #735 from mslinklater/fix_float_promotion
Browse files Browse the repository at this point in the history
Fix double promotion warning
  • Loading branch information
Gadgetoid authored Dec 2, 2021
2 parents a3a229c + 28a1e10 commit 6699db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 32blit/audio/minimp3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6699db8

Please sign in to comment.