From d9f6f7f7636cb989470282370800aa23d80c432e Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sun, 7 Jan 2024 20:32:33 +0100 Subject: Fix sync switching bug --- Makefile | 2 +- src/main.c | 2 +- src/settings.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6b7ec3a..0938c31 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS)) INC_FLAGS += -I$(LIBGBA_SRC) # Output library names and executables. -TARGET := STEPPER-v1.8-dev-06 +TARGET := STEPPER-v1.8-dev-07 ELF := $(BUILD_DIR)/$(TARGET).elf BIN := $(BUILD_DIR)/$(TARGET).gba diff --git a/src/main.c b/src/main.c index 8353d34..5907a30 100644 --- a/src/main.c +++ b/src/main.c @@ -17,6 +17,7 @@ WITH REGARD TO THIS SOFTWARE. // + Sync via MIDI with the Analogue cables. // + Fix bank switching behaviour (bug) // + Add more sync options +// + When switching sync, play status acts wonky (bug) // - Channel params should show if there are some already on all triggers and // modify only the selected parameter, not all of them. // - Should scale mode be toggleable? @@ -25,7 +26,6 @@ WITH REGARD TO THIS SOFTWARE. // - Allow using B + dpad to nudge trigs. This will potentially mean switching // to key release to enable trigs. // - Fix any bugs we currently have -// - When switching sync, play status acts wonky // - Add an envelope to ch3, would need to work with a timer in order to make // it work I think (Can reuse the 96bpq sequencer timer for this). // - Add clipboard sharing between banks. diff --git a/src/settings.c b/src/settings.c index 406abe3..0ed3905 100644 --- a/src/settings.c +++ b/src/settings.c @@ -15,10 +15,10 @@ void sync_in_12(void); void sync_in_4(void); void stop_sound(void); void toggle_playing(void); +void stop_playing(void); void set_audio_settings(void) { - stop_sound(); if (settings.sync == SYNC_IN_LINK_96BPQ || settings.sync == SYNC_IN_LINK_48BPQ || settings.sync == SYNC_IN_LINK_24BPQ || @@ -95,6 +95,7 @@ handle_settings_input(void) { } else { settings.sync++; } + stop_playing(); set_audio_settings(); } break; case SETTINGS_THEME: { @@ -150,6 +151,7 @@ handle_settings_input(void) { } else { settings.sync--; } + stop_playing(); set_audio_settings(); } break; case SETTINGS_THEME: { -- cgit v1.2.1