fix: move prev_state update after MIDI clock handler to fix race condition
Co-authored-by: aider (deepseek/deepseek-chat) <aider@aider.chat>
This commit is contained in:
0
evalutation.md
Normal file
0
evalutation.md
Normal file
@@ -51,7 +51,6 @@ static int process(jack_nframes_t nframes, void *arg)
|
|||||||
}
|
}
|
||||||
playback_pos = 0; /* restart from beginning */
|
playback_pos = 0; /* restart from beginning */
|
||||||
}
|
}
|
||||||
prev_state = state;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----- handle MIDI control port (state transitions) ----- */
|
/* ----- handle MIDI control port (state transitions) ----- */
|
||||||
@@ -160,6 +159,9 @@ static int process(jack_nframes_t nframes, void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* update prev_state after all state changes */
|
||||||
|
prev_state = atomic_load(¤t_state);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user