INNER CODE UNIT · C
i
1oom-fork/1oom · src/fmt_mus.c:45
int i = s->pos;
int num = NOTEOFFBUFSIZE;
while (num) {
if (++i == NOTEOFFBUFSIZE) {
i = 0;
}
if (s->tbl[i].ch == 0) {
s->pos = i;
return i;
}
--num;
}
return -1;
}
static bool xmid_add_pending_noteoff(struct noteoffs_s *s, const uint8_t *data, uint32_t t_now, uint32_t duration)
{
uint32_t t = t_now + duration;