From f991383e5c8a91184538aa9359ea10c9b7da5af0 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Thu, 14 Sep 2023 18:23:57 +0700 Subject: [PATCH] call I_OAL_ReinitSound in I_PCS_ReinitSound (#1207) --- src/i_pcsound.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/i_pcsound.c b/src/i_pcsound.c index 302b47b9..db721d40 100644 --- a/src/i_pcsound.c +++ b/src/i_pcsound.c @@ -324,7 +324,7 @@ static void UnregisterCallback(void) alDeleteBuffers(1, &callback_buffer); } -static boolean I_PCS_ReinitSound(void) +static void InitPCSound(void) { mixing_freq = SND_SAMPLERATE; @@ -337,6 +337,16 @@ static boolean I_PCS_ReinitSound(void) { sound_lock = SDL_CreateMutex(); } +} + +static boolean I_PCS_ReinitSound(void) +{ + if (!I_OAL_ReinitSound()) + { + return false; + } + + InitPCSound(); return true; } @@ -348,7 +358,7 @@ static boolean I_PCS_InitSound(void) return false; } - I_PCS_ReinitSound(); + InitPCSound(); return true; }