summaryrefslogtreecommitdiff
path: root/audio/jack/patches/patch-as
blob: f5b5edccd82a46ebd4108d9b7467012688bfcca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-as,v 1.1 2008/07/31 03:58:05 bjs Exp $

--- drivers/dummy/dummy_driver.c.orig	2008-07-27 08:50:34.000000000 -0400
+++ drivers/dummy/dummy_driver.c
@@ -109,6 +109,7 @@ dummy_driver_wait (dummy_driver_t *drive
 {
 	jack_nframes_t nframes = driver->period_size;
 	struct timespec now;
+	struct timespec ts;
 
 	*status = 0;
 	/* this driver doesn't work so well if we report a delay */
@@ -133,7 +134,9 @@ dummy_driver_wait (dummy_driver_t *drive
 		}
 		driver->next_wakeup = add_ts(driver->next_wakeup, driver->wait_time);
 	} else {
-		if(clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &driver->next_wakeup, NULL)) {
+		ts.tv_sec = 0;
+		ts.tv_nsec = ts_to_nsec(driver->next_wakeup) - ts_to_nsec(now);
+		if(nanosleep(&ts, NULL)) {
 			jack_error("error while sleeping");
 			*status = -1;
 		} else {