fix: correct pointer member access in test_engine.c
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
@@ -445,7 +445,7 @@ void test_midi_clock_start(void) {
|
||||
engine->transport->clock_count = 0;
|
||||
engine->transport->beat_position = 0;
|
||||
engine->transport->bar_position = 0;
|
||||
engine->transport.sample_position = 0;
|
||||
engine->transport->sample_position = 0;
|
||||
|
||||
assert(engine->transport->state == TRANSPORT_PLAYING);
|
||||
assert(engine->transport->clock_count == 0);
|
||||
@@ -506,10 +506,10 @@ void test_beat_tracking(void) {
|
||||
// Simulate 24 clock ticks (one beat)
|
||||
for (int i = 0; i < MIDI_CLOCKS_PER_BEAT; i++) {
|
||||
engine->transport->clock_count++;
|
||||
if (engine->transport.clock_count % MIDI_CLOCKS_PER_BEAT == 0) {
|
||||
if (engine->transport->clock_count % MIDI_CLOCKS_PER_BEAT == 0) {
|
||||
engine->transport->beat_position =
|
||||
(engine->transport->beat_position + 1) % BEATS_PER_BAR;
|
||||
if (engine->transport.beat_position == 0) {
|
||||
if (engine->transport->beat_position == 0) {
|
||||
engine->transport->bar_position++;
|
||||
}
|
||||
}
|
||||
@@ -521,12 +521,12 @@ void test_beat_tracking(void) {
|
||||
|
||||
// Simulate 3 more beats (total 4 beats = 1 bar)
|
||||
for (int i = 0; i < MIDI_CLOCKS_PER_BEAT * 3; i++) {
|
||||
engine->transport.clock_count++;
|
||||
if (engine->transport.clock_count % MIDI_CLOCKS_PER_BEAT == 0) {
|
||||
engine->transport.beat_position =
|
||||
(engine->transport.beat_position + 1) % BEATS_PER_BAR;
|
||||
if (engine->transport.beat_position == 0) {
|
||||
engine->transport.bar_position++;
|
||||
engine->transport->clock_count++;
|
||||
if (engine->transport->clock_count % MIDI_CLOCKS_PER_BEAT == 0) {
|
||||
engine->transport->beat_position =
|
||||
(engine->transport->beat_position + 1) % BEATS_PER_BAR;
|
||||
if (engine->transport->beat_position == 0) {
|
||||
engine->transport->bar_position++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user