mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +00:00
Don't call I_StartupSound in SFX toggle
* Mixer: make I_StartupSound return early if already set up
* Restartaudio: Add StopSFX call
(cherry picked from commit c64d52c1f9)
This commit is contained in:
parent
21e1b72f5b
commit
00987dd7e5
3 changed files with 5 additions and 2 deletions
|
|
@ -4049,6 +4049,7 @@ static void Command_RestartAudio_f(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
S_StopMusic();
|
S_StopMusic();
|
||||||
|
S_StopSounds();
|
||||||
I_ShutdownMusic();
|
I_ShutdownMusic();
|
||||||
I_ShutdownSound();
|
I_ShutdownSound();
|
||||||
I_StartupSound();
|
I_StartupSound();
|
||||||
|
|
|
||||||
|
|
@ -9419,7 +9419,6 @@ static void M_ToggleSFX(INT32 choice)
|
||||||
if (sound_disabled)
|
if (sound_disabled)
|
||||||
{
|
{
|
||||||
sound_disabled = false;
|
sound_disabled = false;
|
||||||
I_StartupSound();
|
|
||||||
S_InitSfxChannels(cv_soundvolume.value);
|
S_InitSfxChannels(cv_soundvolume.value);
|
||||||
S_StartSound(NULL, sfx_strpst);
|
S_StartSound(NULL, sfx_strpst);
|
||||||
OP_SoundOptionsMenu[6].status = IT_STRING | IT_CVAR;
|
OP_SoundOptionsMenu[6].status = IT_STRING | IT_CVAR;
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,10 @@ void I_StartupSound(void)
|
||||||
|
|
||||||
// EE inits audio first so we're following along.
|
// EE inits audio first so we're following along.
|
||||||
if (SDL_WasInit(SDL_INIT_AUDIO) == SDL_INIT_AUDIO)
|
if (SDL_WasInit(SDL_INIT_AUDIO) == SDL_INIT_AUDIO)
|
||||||
CONS_Printf("SDL Audio already started\n");
|
{
|
||||||
|
CONS_Debug(DBG_DETAILED, "SDL Audio already started\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
else if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, "Error initializing SDL Audio: %s\n", SDL_GetError());
|
CONS_Alert(CONS_ERROR, "Error initializing SDL Audio: %s\n", SDL_GetError());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue