diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | jack.pc.in | 2 | ||||
-rw-r--r-- | jackd/engine.c | 14 |
3 files changed, 10 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 41a0f5a..dd74707 100644 --- a/configure.ac +++ b/configure.ac @@ -164,11 +164,15 @@ AC_CHECK_LIB(m, sin) AC_CHECK_FUNC(clock_gettime, [ - AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries") + AC_DEFINE(HAVE_CLOCK_GETTIME,0,"Whether or not clock_gettime can be found in system libraries") ], + # + # if not found, check librt specifically + # AC_CHECK_LIB(rt, clock_gettime, [ AC_DEFINE(HAVE_CLOCK_GETTIME,1,"Whether or not clock_gettime can be found in system libraries") + OS_LDFLAGS="$OS_LDFLAGS -lrt" ]) ) @@ -6,5 +6,5 @@ includedir=@includedir@ Name: jack Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server Version: @JACK_VERSION@ -Libs: -L${libdir} -ljack -lpthread "@OS_LDFLAGS@" +Libs: -L${libdir} -ljack -lpthread @OS_LDFLAGS@ Cflags: -I${includedir} diff --git a/jackd/engine.c b/jackd/engine.c index a625db8..2285388 100644 --- a/jackd/engine.c +++ b/jackd/engine.c @@ -2062,21 +2062,15 @@ jack_run_cycle (jack_engine_t *engine, jack_nframes_t nframes, if (timer->reset_pending) { /* post xrun-handling */ - - jack_nframes_t period_size_guess = - engine->control->current_time.frame_rate * - ((timer->next_wakeup - timer->current_wakeup) / 1000000.0); - timer->frames += - ((engine->driver->last_wait_ust - - engine->control->frame_timer.next_wakeup) / - period_size_guess) * - period_size_guess; + /* don't bother to increment the frame counter, because we missed 1 or more + deadlines in the backend anyway. + */ timer->current_wakeup = engine->driver->last_wait_ust; timer->next_wakeup = engine->driver->last_wait_ust + engine->driver->period_usecs; - + timer->reset_pending = 0; } else { |