Commit 3c42989b authored by Jacob Vosmaer's avatar Jacob Vosmaer

Simplify poly2 assign loop

parent 75a66c48
......@@ -312,15 +312,10 @@ void poly2_init(void) {
}
void poly2_assign_available_voices(void) {
for (; !l_empty(&poly2.available_voices);) {
for (; !l_empty(&poly2.available_voices) &&
!l_empty(&poly2.note_queue);) {
uint8_t v = l_popr(&poly2.available_voices);
uint8_t note = l_popr(&poly2.note_queue);
if (note == poly2.note_queue.sup) {
l_pushr(&poly2.available_voices, v);
return;
}
gate_on(v);
pitch_set_note(v, note, 0);
poly2.current_note[v] = note;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment