diff options
author | Bad Diode <bd@badd10de.dev> | 2024-01-07 20:32:33 +0100 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-01-07 20:32:58 +0100 |
commit | d9f6f7f7636cb989470282370800aa23d80c432e (patch) | |
tree | ba401318cc9921c8b3fba1533fc5e7094b2970c4 | |
parent | 2b2c118c08a3d049bc8986b0d16ac583f26dcf8f (diff) | |
download | stepper-d9f6f7f7636cb989470282370800aa23d80c432e.tar.gz stepper-d9f6f7f7636cb989470282370800aa23d80c432e.zip |
Fix sync switching bug
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/settings.c | 4 |
3 files changed, 5 insertions, 3 deletions
@@ -27,7 +27,7 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS)) | |||
27 | INC_FLAGS += -I$(LIBGBA_SRC) | 27 | INC_FLAGS += -I$(LIBGBA_SRC) |
28 | 28 | ||
29 | # Output library names and executables. | 29 | # Output library names and executables. |
30 | TARGET := STEPPER-v1.8-dev-06 | 30 | TARGET := STEPPER-v1.8-dev-07 |
31 | ELF := $(BUILD_DIR)/$(TARGET).elf | 31 | ELF := $(BUILD_DIR)/$(TARGET).elf |
32 | BIN := $(BUILD_DIR)/$(TARGET).gba | 32 | BIN := $(BUILD_DIR)/$(TARGET).gba |
33 | 33 | ||
@@ -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); | |||
15 | void sync_in_4(void); | 15 | void sync_in_4(void); |
16 | void stop_sound(void); | 16 | void stop_sound(void); |
17 | void toggle_playing(void); | 17 | void toggle_playing(void); |
18 | void stop_playing(void); | ||
18 | 19 | ||
19 | void | 20 | void |
20 | set_audio_settings(void) { | 21 | set_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: { |