[linux-audio-user] Re: [linux-audio-dev] dssi question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 5 Dec 2004 14:25:59 +0000, Chris Cannam
<cannam@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Sunday 05 Dec 2004 11:37, Julien Claassen wrote:
> >   I've just one important - for me at least - question. Can the jack
> > example client be used without gui? Can it be used with midi only?
> 
> Yes and no.  The DSSI JACK host will always try to start a user interface for
> each plugin it loads.  (It could easily have a command line switch to tell it
> not to, but there isn't one at the moment.)  

Attached is a patch.

-- 
De gustibus non disputandum est.
-------------- next part --------------
--- /tmp/jack-dssi-host.c.orig	2004-12-05 09:52:23.000000000 -0700
+++ dssi-0.9/jack-dssi-host/jack-dssi-host.c	2004-12-05 15:36:53.000000000 -0700
@@ -92,6 +92,7 @@
 
 int exiting = 0;
 static int verbose = 0;
+static int load_guis = 1;
 const char *myName = NULL;
 
 #define EVENT_BUFFER_SIZE 1024
@@ -729,8 +730,9 @@
     /* Parse args and report usage */
 
     if (argc < 2) {
-	fprintf(stderr, "\nUsage: %s [-v] [-p <projdir>] [-<i>] <libname>[%c<label>] [...]\n", argv[0], LABEL_SEP);
+	fprintf(stderr, "\nUsage: %s [-v] [-n] [-p <projdir>] [-<i>] <libname>[%c<label>] [...]\n", argv[0], LABEL_SEP);
 	fprintf(stderr, "\n  -v        Verbose mode\n");
+	fprintf(stderr, "  -n        No GUIs\n");
 	fprintf(stderr, "  <projdir> Project directory to pass to plugin and UI\n");
 	fprintf(stderr, "  <i>       Number of instances of each plugin to run (max %d total, default 1)\n", D3H_MAX_INSTANCES);
 	fprintf(stderr, "  <libname> DSSI plugin library .so to load (searched for in $DSSI_PATH)\n");
@@ -755,6 +757,10 @@
 	    verbose = 1;
 	    continue;
 	}
+	if (!strcmp(argv[i], "-n")) {
+	    load_guis = 0;
+	    continue;
+	}
 
 	if (!strcmp(argv[i], "-p")) {
 	    if (i < argc - 1) {
@@ -1263,15 +1269,16 @@
     /* Attempt to locate and start up a GUI for the plugin -- but
      * continue even if we can't */
     /* -FIX- Ack! So many windows all at once! */
-    for (i = 0; i < instance_count; i++) {
-        char tag[12];
-        plugin = instances[i].plugin;
-        snprintf(osc_path_tmp, 1024, "%s/%s", url, instances[i].friendly_name);
-        snprintf(tag, 12, "channel %d", instances[i].channel);
-	printf("\n%s: OSC URL is:\n%s\n\n", myName, osc_path_tmp);
-        startGUI(plugin->dll->directory, plugin->dll->name,
-                 plugin->descriptor->LADSPA_Plugin->Label, osc_path_tmp, tag);
-    }
+    if (load_guis)
+        for (i = 0; i < instance_count; i++) {
+            char tag[12];
+            plugin = instances[i].plugin;
+            snprintf(osc_path_tmp, 1024, "%s/%s", url, instances[i].friendly_name);
+            snprintf(tag, 12, "channel %d", instances[i].channel);
+            printf("\n%s: OSC URL is:\n%s\n\n", myName, osc_path_tmp);
+            startGUI(plugin->dll->directory, plugin->dll->name,
+                    plugin->descriptor->LADSPA_Plugin->Label, osc_path_tmp, tag);
+        }
 
     MB_MESSAGE("Ready\n");
 

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux