fix: correct sample_position access to use arrow operator in test assertions

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 21:54:08 +00:00
parent 45b22acbc7
commit 340e83cbce

View File

@@ -552,7 +552,7 @@ void test_sample_position_calculation(void) {
(engine->transport->clock_count * engine->sample_rate * 4) / (engine->transport->clock_count * engine->sample_rate * 4) /
(MIDI_CLOCKS_PER_BEAT * BEATS_PER_BAR); (MIDI_CLOCKS_PER_BEAT * BEATS_PER_BAR);
assert(engine->transport.sample_position == engine->sample_rate); // 1 beat = 48000 samples assert(engine->transport->sample_position == engine->sample_rate); // 1 beat = 48000 samples
// After 96 clocks (4 beats = 1 bar) // After 96 clocks (4 beats = 1 bar)
engine->transport->clock_count = MIDI_CLOCKS_PER_BEAT * 4; engine->transport->clock_count = MIDI_CLOCKS_PER_BEAT * 4;
@@ -560,7 +560,7 @@ void test_sample_position_calculation(void) {
(engine->transport->clock_count * engine->sample_rate * 4) / (engine->transport->clock_count * engine->sample_rate * 4) /
(MIDI_CLOCKS_PER_BEAT * BEATS_PER_BAR); (MIDI_CLOCKS_PER_BEAT * BEATS_PER_BAR);
assert(engine->transport.sample_position == engine->sample_rate * 4); // 1 bar = 192000 samples assert(engine->transport->sample_position == engine->sample_rate * 4); // 1 bar = 192000 samples
destroy_test_engine(engine); destroy_test_engine(engine);
printf("PASSED\n"); printf("PASSED\n");