Skip to content

Commit

Permalink
Always set SDL music volume (#1133)
Browse files Browse the repository at this point in the history
* Always set SDL music volume

* Respect DISABLE_SDL2MIXER
  • Loading branch information
mikeday0 authored Jan 2, 2024
1 parent 1893c65 commit 401940e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/i_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,18 @@ void I_ShutdownMusic(void)

void I_SetMusicVolume(int volume)
{
if (active_music_module != NULL)
if (music_module != NULL)
{
active_music_module->SetMusicVolume(volume);
music_module->SetMusicVolume(volume);

if (music_packs_active && active_music_module != &music_pack_module)
#ifndef DISABLE_SDL2MIXER
// [crispy] always broadcast volume changes to SDL. This also covers
// the musicpack module.
if (music_module != &music_sdl_module)
{
music_pack_module.SetMusicVolume(volume);
music_sdl_module.SetMusicVolume(volume);
}
#endif
}
}

Expand Down

0 comments on commit 401940e

Please sign in to comment.