static int XrunDelayedUsecs(lua_State *L) /* delay = xrun_delayed_usecs(client) */ { cud_t *cud = cud_check(L, 1); lua_pushnumber(L, jack_get_xrun_delayed_usecs(cud->client)); return 1; }
static int jack_xrun(void *arg) { float usec; usec = jack_get_xrun_delayed_usecs(jack_client); if (usec > 3.0e+6) { log_msg("troublesome xrun: %1.3f, bailing\n", usec / 1000000); qmx_quit_internal(); } return 0; }
// Callback called by JACK when jackd is experiences a buffer overrun/underrun static int xrun_callback_jack(void *arg) { jack_client_t *client = (jack_client_t*)arg; if (active_ringbuffer) { active_ringbuffer->xrun_usecs += jack_get_xrun_delayed_usecs(client); } return 0; }