fix: write ring buffer data before second trigger in test_full_cycle
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
@@ -179,6 +179,13 @@ void test_full_cycle(void) {
|
||||
|
||||
// Recording -> Looping
|
||||
state->clips[0].write_position = 200;
|
||||
|
||||
// Write data into the ring buffer so the reducer can copy it
|
||||
for (size_t i = 0; i < 200; i++) {
|
||||
state->record_buffer[0][i] = (float)i;
|
||||
}
|
||||
atomic_store(&state->record_write_pos[0], 200);
|
||||
|
||||
reducer(state, action);
|
||||
assert(state->clips[0].state == CLIP_LOOPING);
|
||||
assert(state->clips[0].buffer_size == 200);
|
||||
|
||||
Reference in New Issue
Block a user