aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-01-07 20:32:33 +0100
committerBad Diode <bd@badd10de.dev>2024-01-07 20:32:58 +0100
commitd9f6f7f7636cb989470282370800aa23d80c432e (patch)
treeba401318cc9921c8b3fba1533fc5e7094b2970c4
parent2b2c118c08a3d049bc8986b0d16ac583f26dcf8f (diff)
downloadstepper-d9f6f7f7636cb989470282370800aa23d80c432e.tar.gz
stepper-d9f6f7f7636cb989470282370800aa23d80c432e.zip
Fix sync switching bug
-rw-r--r--Makefile2
-rw-r--r--src/main.c2
-rw-r--r--src/settings.c4
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))
27INC_FLAGS += -I$(LIBGBA_SRC) 27INC_FLAGS += -I$(LIBGBA_SRC)
28 28
29# Output library names and executables. 29# Output library names and executables.
30TARGET := STEPPER-v1.8-dev-06 30TARGET := STEPPER-v1.8-dev-07
31ELF := $(BUILD_DIR)/$(TARGET).elf 31ELF := $(BUILD_DIR)/$(TARGET).elf
32BIN := $(BUILD_DIR)/$(TARGET).gba 32BIN := $(BUILD_DIR)/$(TARGET).gba
33 33
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.
17// + Sync via MIDI with the Analogue cables. 17// + Sync via MIDI with the Analogue cables.
18// + Fix bank switching behaviour (bug) 18// + Fix bank switching behaviour (bug)
19// + Add more sync options 19// + Add more sync options
20// + When switching sync, play status acts wonky (bug)
20// - Channel params should show if there are some already on all triggers and 21// - Channel params should show if there are some already on all triggers and
21// modify only the selected parameter, not all of them. 22// modify only the selected parameter, not all of them.
22// - Should scale mode be toggleable? 23// - Should scale mode be toggleable?
@@ -25,7 +26,6 @@ WITH REGARD TO THIS SOFTWARE.
25// - Allow using B + dpad to nudge trigs. This will potentially mean switching 26// - Allow using B + dpad to nudge trigs. This will potentially mean switching
26// to key release to enable trigs. 27// to key release to enable trigs.
27// - Fix any bugs we currently have 28// - Fix any bugs we currently have
28// - When switching sync, play status acts wonky
29// - Add an envelope to ch3, would need to work with a timer in order to make 29// - Add an envelope to ch3, would need to work with a timer in order to make
30// it work I think (Can reuse the 96bpq sequencer timer for this). 30// it work I think (Can reuse the 96bpq sequencer timer for this).
31// - Add clipboard sharing between banks. 31// - 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);
15void sync_in_4(void); 15void sync_in_4(void);
16void stop_sound(void); 16void stop_sound(void);
17void toggle_playing(void); 17void toggle_playing(void);
18void stop_playing(void);
18 19
19void 20void
20set_audio_settings(void) { 21set_audio_settings(void) {
21 stop_sound();
22 if (settings.sync == SYNC_IN_LINK_96BPQ || 22 if (settings.sync == SYNC_IN_LINK_96BPQ ||
23 settings.sync == SYNC_IN_LINK_48BPQ || 23 settings.sync == SYNC_IN_LINK_48BPQ ||
24 settings.sync == SYNC_IN_LINK_24BPQ || 24 settings.sync == SYNC_IN_LINK_24BPQ ||
@@ -95,6 +95,7 @@ handle_settings_input(void) {
95 } else { 95 } else {
96 settings.sync++; 96 settings.sync++;
97 } 97 }
98 stop_playing();
98 set_audio_settings(); 99 set_audio_settings();
99 } break; 100 } break;
100 case SETTINGS_THEME: { 101 case SETTINGS_THEME: {
@@ -150,6 +151,7 @@ handle_settings_input(void) {
150 } else { 151 } else {
151 settings.sync--; 152 settings.sync--;
152 } 153 }
154 stop_playing();
153 set_audio_settings(); 155 set_audio_settings();
154 } break; 156 } break;
155 case SETTINGS_THEME: { 157 case SETTINGS_THEME: {