From 50c803e8f43724259933c1415161ea0344cfc54d Mon Sep 17 00:00:00 2001
From: Sylvain Becker <[EMAIL REDACTED]>
Date: Wed, 28 Dec 2022 22:52:24 +0100
Subject: [PATCH] Add back SDL_FreeWAV (#11)
SDL_FreeWAV() was removed from SDL3
---
src/sdl2_compat.c | 6 ++++++
src/sdl3_syms.h | 1 -
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 2cb7471..8dccfb7 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -2772,6 +2772,12 @@ SDL_Has3DNow(void)
return SDL_FALSE;
}
+DECLSPEC void SDLCALL
+SDL_FreeWAV(Uint8 * audio_buf)
+{
+ SDL_free(audio_buf);
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index e4f00d8..a77eeb4 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -107,7 +107,6 @@ SDL3_SYM_PASSTHROUGH(SDL_AudioStatus,GetAudioDeviceStatus,(SDL_AudioDeviceID a),
SDL3_SYM_PASSTHROUGH(void,PauseAudio,(int a),(a),)
SDL3_SYM_PASSTHROUGH(void,PauseAudioDevice,(SDL_AudioDeviceID a, int b),(a,b),)
SDL3_SYM(SDL_AudioSpec*,LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
-SDL3_SYM_PASSTHROUGH(void,FreeWAV,(Uint8 *a),(a),)
SDL3_SYM_PASSTHROUGH(int,BuildAudioCVT,(SDL_AudioCVT *a, SDL_AudioFormat b, Uint8 c, int d, SDL_AudioFormat e, Uint8 f, int g),(a,b,c,d,e,f,g),return)
SDL3_SYM_PASSTHROUGH(int,ConvertAudio,(SDL_AudioCVT *a),(a),return)
SDL3_SYM_PASSTHROUGH(void,MixAudio,(Uint8 *a, const Uint8 *b, Uint32 c, int d),(a,b,c,d),)