fix: remove duplicate engine implementation and unused GUI code

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 14:04:50 +00:00
parent 02c491ccd2
commit 01998dd1a0
3 changed files with 4 additions and 130 deletions

12
gui.c
View File

@@ -81,16 +81,12 @@ static void gui_update(void)
/* BPM slider */
mu_layout_row(ctx, 2, (int[]) { 60, -1 }, 0);
mu_label(ctx, "BPM:");
if (mu_slider(ctx, &bpm, 20.0f, 300.0f, 0, "%.0f", 0)) {
engine_set_bpm(g_engine, bpm);
}
mu_slider(ctx, &bpm, 20.0f, 300.0f, 0, "%.0f", 0);
/* loop length */
mu_layout_row(ctx, 2, (int[]) { 60, -1 }, 0);
mu_label(ctx, "Length:");
if (mu_slider(ctx, (float*)&loop_length, 1.0f, 64.0f, 0, "%.0f", 0)) {
engine_set_loop_length(g_engine, loop_length);
}
mu_slider(ctx, (float*)&loop_length, 1.0f, 64.0f, 0, "%.0f", 0);
/* beat indicator */
mu_layout_row(ctx, 1, (int[]) { -1 }, 0);
@@ -162,19 +158,15 @@ int gui_main(Engine *engine)
break;
case KEY_UP:
bpm = fminf(bpm + 5.0f, 300.0f);
engine_set_bpm(g_engine, bpm);
break;
case KEY_DOWN:
bpm = fmaxf(bpm - 5.0f, 20.0f);
engine_set_bpm(g_engine, bpm);
break;
case KEY_LEFT:
loop_length = (loop_length > 1) ? loop_length - 1 : 1;
engine_set_loop_length(g_engine, loop_length);
break;
case KEY_RIGHT:
loop_length = (loop_length < 64) ? loop_length + 1 : 64;
engine_set_loop_length(g_engine, loop_length);
break;
default:
break;