From a41103b170b80681c20988316f45c8c77682e1a9 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 9 Jan 2017 05:59:30 -0500 Subject: [PATCH] audio: Patched to compile if linking directly to libsamplerate. --- src/audio/SDL_audio.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index 4aec300bbac90..fa2a2b8e10581 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -134,7 +134,6 @@ LoadLibSampleRate(void) if (!SRC_lib) { return SDL_FALSE; } -#endif SRC_src_new = (SRC_STATE* (*)(int converter_type, int channels, int *error))SDL_LoadFunction(SRC_lib, "src_new"); SRC_src_process = (int (*)(SRC_STATE *state, SRC_DATA *data))SDL_LoadFunction(SRC_lib, "src_process"); @@ -143,12 +142,17 @@ LoadLibSampleRate(void) SRC_src_strerror = (const char* (*)(int error))SDL_LoadFunction(SRC_lib, "src_strerror"); if (!SRC_src_new || !SRC_src_process || !SRC_src_reset || !SRC_src_delete || !SRC_src_strerror) { - #ifdef SDL_LIBSAMPLERATE_DYNAMIC SDL_UnloadObject(SRC_lib); SRC_lib = NULL; - #endif return SDL_FALSE; } +#else + SRC_src_new = src_new; + SRC_src_process = src_process; + SRC_src_reset = src_reset; + SRC_src_delete = src_delete; + SRC_src_strerror = src_strerror; +#endif SRC_available = SDL_TRUE; return SDL_TRUE;