patches/jack-03-timersub.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 426 d35df11c8ac1
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
426
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     1
--- jack-audio-connection-kit-0.103.0/drivers/alsa/alsa_driver.c.orig	2007-08-24 21:02:54.664945251 +0700
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     2
+++ jack-audio-connection-kit-0.103.0/drivers/alsa/alsa_driver.c	2007-08-24 21:04:11.234329000 +0700
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     3
@@ -54,6 +54,16 @@
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     4
 /* Delay (in process calls) before jackd will report an xrun */
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     5
 #define XRUN_REPORT_DELAY 0
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     6
 
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     7
+#define timersub(a, b, result) \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     8
+do { \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     9
+	(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    10
+  (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    11
+  if ((result)->tv_usec < 0) { \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    12
+		--(result)->tv_sec; \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    13
+		(result)->tv_usec += 1000000; \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    14
+	} \
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    15
+} while (0)
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    16
+
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    17
 static void
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    18
 alsa_driver_release_channel_dependent_memory (alsa_driver_t *driver)
d35df11c8ac1 2007-08-28 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    19
 {