Browse Source

[0.99.13] account for late poll() in ALSA driver

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@805 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
joq 20 years ago
parent
commit
7cc82b9e16
3 changed files with 13 additions and 1 deletions
  1. +1
    -1
      configure.ac
  2. +11
    -0
      drivers/alsa/alsa_driver.c
  3. +1
    -0
      drivers/alsa/alsa_driver.h

+ 1
- 1
configure.ac View File

@@ -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


+ 11
- 0
drivers/alsa/alsa_driver.c View File

@@ -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;



+ 1
- 0
drivers/alsa/alsa_driver.h View File

@@ -135,6 +135,7 @@ typedef struct {
int running;
int run;

int poll_late;
int xrun_count;
int process_count;



Loading…
Cancel
Save