From 59fdcee9bfc79e47c790a9a8295d89168e597203 Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Fri, 9 Jan 2026 03:05:53 -0600 Subject: [PATCH] Fixed volume sliders --- src/audio/load.c | 6 +++--- src/audio/synthesis.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audio/load.c b/src/audio/load.c index 8d2e0fd9..4e8595a2 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -542,9 +542,9 @@ void audio_init() { init_sequence_players(); gAudioLoadLock = AUDIO_LOCK_NOT_LOADING; - audio_set_player_volume(SEQ_PLAYER_LEVEL, CVarGetFloat("gSettings.Volume.MainMusic", 1.0f)); - audio_set_player_volume(SEQ_PLAYER_ENV, CVarGetFloat("gSettings.Volume.Environment", 1.0f)); - audio_set_player_volume(SEQ_PLAYER_SFX, CVarGetFloat("gSettings.Volume.SFX", 1.0f)); + audio_set_player_volume(SEQ_PLAYER_LEVEL, CVarGetInteger("gSettings.Volume.MainMusic", 100) / 100.0f); + audio_set_player_volume(SEQ_PLAYER_ENV, CVarGetInteger("gSettings.Volume.Environment", 100) / 100.0f); + audio_set_player_volume(SEQ_PLAYER_SFX, CVarGetInteger("gSettings.Volume.SFX", 100) / 100.0f); // Should probably contain the sizes of the data banks, but those aren't // easily accessible from here. diff --git a/src/audio/synthesis.c b/src/audio/synthesis.c index 764e9293..1b3ceecf 100644 --- a/src/audio/synthesis.c +++ b/src/audio/synthesis.c @@ -1497,7 +1497,7 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, f32 pan, u8 reverb } - float master_vol = CVarGetFloat("gSettings.Volume.Master", 1.0f); + float master_vol = CVarGetInteger("gSettings.Volume.Master", 100) / 100.0f; volLeft *= master_vol; volRight *= master_vol;