SDL_mixer: music_wav.c: Added skipping of pad byte at RIFF chunks (69a50)

From 69a504a5ee3f5b2e95a5539661a97092bef6a4b3 Mon Sep 17 00:00:00 2001
From: Wohlstand <[EMAIL REDACTED]>
Date: Sun, 27 Aug 2023 23:58:45 +0300
Subject: [PATCH] music_wav.c: Added skipping of pad byte at RIFF chunks

Taken from SDL_wave.c. Fixes playing of some WAV files that contains chunks with non-even length.

https://github.com/WohlSoft/SDL-Mixer-X/commit/073af71b2e47f45b659c7bb5fcb8fe0e610e1395
---
 src/codecs/music_wav.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/codecs/music_wav.c b/src/codecs/music_wav.c
index 654e821b..8f6f03a5 100644
--- a/src/codecs/music_wav.c
+++ b/src/codecs/music_wav.c
@@ -959,6 +959,12 @@ static SDL_bool LoadWAVMusic(WAV_Music *wave)
                 return SDL_FALSE;
             break;
         }
+
+        /* RIFF chunks have a 2-byte alignment. Skip padding byte. */
+        if (chunk_length & 1) {
+            if (SDL_RWseek(src, 1, RW_SEEK_CUR) < 0)
+                return SDL_FALSE;
+        }
     }
 
     if (!found_FMT) {