SDL_mixer: Make sure we fade at least one step

From 80c120a28c00b2e28a3edfab02d441d9976c3480 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 20 May 2022 11:52:18 -0700
Subject: [PATCH] Make sure we fade at least one step

Fixes https://github.com/libsdl-org/SDL_mixer/issues/127
---
 src/music.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/music.c b/src/music.c
index b3bddfdb..c45e9ea0 100644
--- a/src/music.c
+++ b/src/music.c
@@ -883,7 +883,7 @@ int Mix_FadeInMusicPos(Mix_Music *music, int loops, int ms, double position)
         music->fading = MIX_NO_FADING;
     }
     music->fade_step = 0;
-    music->fade_steps = ms/ms_per_step;
+    music->fade_steps = (ms + ms_per_step - 1) / ms_per_step;
 
     /* Play the puppy */
     Mix_LockAudio();