From 722927560e83490dab07365963ee373b8ef7c2de Mon Sep 17 00:00:00 2001 From: Loic Coenen Date: Tue, 5 May 2026 09:39:40 +0000 Subject: [PATCH] fix: update reducer calls to pass pointer instead of value Co-authored-by: aider (deepseek/deepseek-coder) --- test_engine.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_engine.c b/test_engine.c index b70ab84..a41dbba 100644 --- a/test_engine.c +++ b/test_engine.c @@ -575,7 +575,7 @@ void test_quantization_with_transport(void) { // Set quantize to beat Action action = { .type = ACTION_SET_QUANTIZE_MODE, .data.set_quantize_mode = { .mode = QUANTIZE_BEAT } }; - *state = reducer(*state, action); + reducer(state, action); // Calculate next beat boundary jack_nframes_t frames_per_beat = state->sample_rate; // 48000 at 120 BPM @@ -588,7 +588,7 @@ void test_quantization_with_transport(void) { // Test bar quantization action.data.set_quantize_mode.mode = QUANTIZE_BAR; - *state = reducer(*state, action); + reducer(state, action); jack_nframes_t frames_per_bar = frames_per_beat * BEATS_PER_BAR; jack_nframes_t next_bar = ((current_pos / frames_per_bar) + 1) * frames_per_bar; quantize_frame = next_bar - state->sample_position; @@ -612,7 +612,7 @@ void test_quantization_off_with_transport(void) { state->sample_position = state->sample_rate * 2; Action action = { .type = ACTION_SET_QUANTIZE_MODE, .data.set_quantize_mode = { .mode = QUANTIZE_OFF } }; - *state = reducer(*state, action); + reducer(state, action); // When quantize is off, trigger should be immediate jack_nframes_t current_frame = 100; @@ -634,7 +634,7 @@ void test_quantization_without_transport(void) { state->transport_state = TRANSPORT_STOPPED; Action action = { .type = ACTION_SET_QUANTIZE_MODE, .data.set_quantize_mode = { .mode = QUANTIZE_BEAT } }; - *state = reducer(*state, action); + reducer(state, action); // When transport is not rolling, trigger should be immediate jack_nframes_t current_frame = 100;