diff --git a/configure.ac b/configure.ac index 6a1530e..fcc5645 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ dnl changes are made dnl --- JACK_MAJOR_VERSION=0 JACK_MINOR_VERSION=99 -JACK_MICRO_VERSION=12 +JACK_MICRO_VERSION=13 dnl --- dnl HOWTO: updating the jack protocol version diff --git a/drivers/alsa/alsa_driver.c b/drivers/alsa/alsa_driver.c index 9d86f98..fc9ba00 100644 --- a/drivers/alsa/alsa_driver.c +++ b/drivers/alsa/alsa_driver.c @@ -1187,6 +1187,16 @@ alsa_driver_wait (alsa_driver_t *driver, int extra_fd, int *status, float poll_enter = jack_get_microseconds (); + if (poll_enter > driver->poll_next) { + /* + * This processing cycle was delayed past the + * next due interrupt! Do not account this as + * a wakeup delay: + */ + driver->poll_next = 0; + driver->poll_late++; + } + if (poll (driver->pfd, nfds, driver->poll_timeout) < 0) { if (errno == EINTR) { @@ -1924,6 +1934,7 @@ alsa_driver_new (char *name, char *playback_alsa_device, pthread_mutex_init (&driver->clock_sync_lock, 0); driver->clock_sync_listeners = 0; + driver->poll_late = 0; driver->xrun_count = 0; driver->process_count = 0; diff --git a/drivers/alsa/alsa_driver.h b/drivers/alsa/alsa_driver.h index f85a7d1..eb1f94a 100644 --- a/drivers/alsa/alsa_driver.h +++ b/drivers/alsa/alsa_driver.h @@ -135,6 +135,7 @@ typedef struct { int running; int run; + int poll_late; int xrun_count; int process_count;