From d11fe1ac8dc84a31435d603bdee5bb96581f7e32 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Fri, 30 Oct 2020 01:24:55 +0300 Subject: [PATCH] mixer.c (Mix_QuickLoad_WAV): replace memcmp() with SDL_memcmp(). Backported from https://hg.libsdl.org/SDL_mixer/rev/11cf0e479462 --- src/mixer.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mixer.c b/src/mixer.c index 11752b4a..816a2dab 100644 --- a/src/mixer.c +++ b/src/mixer.c @@ -282,7 +282,7 @@ mix_channels(void *udata, Uint8 *stream, int len) Uint32 ticks = sdl_ticks - mix_channel[i].ticks_fade; if (ticks >= mix_channel[i].fade_length) { Mix_Volume(i, mix_channel[i].fade_volume_reset); /* Restore the volume */ - if(mix_channel[i].fading == MIX_FADING_OUT) { + if (mix_channel[i].fading == MIX_FADING_OUT) { mix_channel[i].playing = 0; mix_channel[i].looping = 0; mix_channel[i].expire = 0; @@ -835,7 +835,7 @@ Mix_Chunk * SDLCALLCC Mix_QuickLoad_WAV(Uint8 *mem) mem += 4; chunk->abuf = mem; mem += chunk->alen; - } while (memcmp(magic, "data", 4) != 0); + } while (SDL_memcmp(magic, "data", 4) != 0); chunk->volume = MIX_MAX_VOLUME; return(chunk); @@ -1178,7 +1178,7 @@ int SDLCALLCC Mix_HaltChannel(int which) mix_channel[which].looping = 0; } mix_channel[which].expire = 0; - if(mix_channel[which].fading != MIX_NO_FADING) /* Restore volume */ + if (mix_channel[which].fading != MIX_NO_FADING) /* Restore volume */ mix_channel[which].volume = mix_channel[which].fade_volume_reset; mix_channel[which].fading = MIX_NO_FADING; Mix_UnlockAudio(); @@ -1192,7 +1192,7 @@ int SDLCALLCC Mix_HaltGroup(int tag) int i; for (i=0; i 0) { - if(mix_channel[i].expire > 0) + if (mix_channel[i].expire > 0) mix_channel[i].expire += sdl_ticks - mix_channel[i].paused; mix_channel[i].paused = 0; } } } else if (which < num_channels) { if (mix_channel[which].playing > 0) { - if(mix_channel[which].expire > 0) + if (mix_channel[which].expire > 0) mix_channel[which].expire += sdl_ticks - mix_channel[which].paused; mix_channel[which].paused = 0; }