Hi!

Your patch does not apply to current jackd upstream. The target has
moved from example-clients to tools, however, signals have been removed.

Find attached the reworked patch, but it doesn't work, at least not with
the dummy client (I currently have no other free cards ;).

I suggest to close this bug and you contact upstream (jackaudio.org)
directly.

Cheerio

-- 
mail: a...@thur.de      http://adi.thur.de      PGP/GPG: key via keyserver

Wer anderen eine Bratwurst brät der hat ein Bratwurstbratgerät
                                                (Holger Imig in dtj)
Index: tools/capture_client.c
===================================================================
--- tools/capture_client.c	(revision 3436)
+++ tools/capture_client.c	(working copy)
@@ -31,6 +31,7 @@
 #include <getopt.h>
 #include <jack/jack.h>
 #include <jack/ringbuffer.h>
+#include <signal.h>
 
 typedef struct _thread_info {
     pthread_t thread_id;
@@ -60,7 +61,9 @@
 pthread_cond_t  data_ready = PTHREAD_COND_INITIALIZER;
 long overruns = 0;
 
+int capture_stopped = 0;
 
+
 void *
 disk_thread (void *arg)
 {
@@ -118,7 +121,7 @@
 	jack_thread_info_t *info = (jack_thread_info_t *) arg;
 
 	/* Do nothing until we're ready to begin. */
-	if ((!info->can_process) || (!info->can_capture))
+	if ((!info->can_process) || (!info->can_capture) || capture_stopped)
 		return 0;
 
 	for (chn = 0; chn < nports; chn++)
@@ -257,6 +260,12 @@
 	info->can_process = 1;		/* process() can start, now */
 }
 
+static void
+usr_signal_handler (int sig)
+{
+    capture_stopped = sig == SIGUSR1;
+}
+
 int
 main (int argc, char *argv[])
 
@@ -322,6 +331,8 @@
 	thread_info.client = client;
 	thread_info.channels = argc - optind;
 	thread_info.can_process = 0;
+    signal (SIGUSR1, usr_signal_handler);
+    signal (SIGUSR2, usr_signal_handler);
 
 	setup_disk_thread (&thread_info);
 

Reply via email to