From b61fb54c26238be27eb420001a0b00b53ad1fa69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=AFl=20Dogru?= Date: Wed, 5 Aug 2026 21:37:18 +0100 Subject: [PATCH] Fix stream volume commands ignored at boot init_volume_state_tracker initialised state_volume_muted to 0x0f. The mute gate in stream_volume_down and stream_volume_up skips when it is non-zero, so the music level could not change until an explicit volume_unmute. Initialise it to 0 so volume control works from boot. --- nullsound/volume.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nullsound/volume.s b/nullsound/volume.s index 58c6552..9c42e1a 100644 --- a/nullsound/volume.s +++ b/nullsound/volume.s @@ -104,11 +104,12 @@ state_volume_adpcm_a_master_ramp:: init_volume_state_tracker:: - ;; reset music volume to max (no attenuation) + ;; reset music volume to max (no attenuation), start unmuted ld a, #0x0f ld (state_volume_music_level), a - ld (state_volume_muted), a ld (state_volume_mute_level), a + xor a + ld (state_volume_muted), a ;; reset channel levels ld a, #0 ld (state_fm_volume_attenuation), a