void opl3_poll(opl_t *opl, int16_t *bufl, int16_t *bufr) { opl3_update(0, bufl, bufr, 1); opl->filtbuf[0] = *bufl = ((*bufl) / 4) + ((opl->filtbuf[0] * 11) / 16); opl->filtbuf[1] = *bufr = ((*bufr) / 4) + ((opl->filtbuf[1] * 11) / 16); if (opl->timers_enable[0][0]) { opl->timers[0][0]--; if (opl->timers[0][0] < 0) { opl->timers_enable[0][0] = 0; opl_timer_over(0, 0); } } if (opl->timers_enable[0][1]) { opl->timers[0][1]--; if (opl->timers[0][1] < 0) { opl->timers_enable[0][1] = 0; opl_timer_over(0, 1); } } }
static void opl_timer_callback11(void *p) { opl_t *opl = (opl_t *)p; opl->timers_enable[1][1] = 0; opl_timer_over(1, 1); }
static void opl_timer_callback00(void *p) { opl_t *opl = (opl_t *)p; opl->timers_enable[0][0] = 0; opl_timer_over(0, 0); }