aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2021-01-05 17:42:48 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2021-01-05 17:42:48 +0100
commit80f25bb3de5815ebc2bcbd5ad0676311d905df1c (patch)
treee2a645225d875be41377ac533e489ccdfc2abc86
parentfd1af2bb6c782c7d749f305471afe58c22eab1b2 (diff)
downloadsynthpod-80f25bb3de5815ebc2bcbd5ad0676311d905df1c.tar.xz
add (q)uiet cli argument.
-rw-r--r--VERSION2
-rw-r--r--bin/synthpod_alsa.c146
-rw-r--r--bin/synthpod_bin.c1
-rw-r--r--bin/synthpod_dummy.c128
-rw-r--r--bin/synthpod_jack.c118
-rw-r--r--plugins/synthpod_common_nk.c1
-rw-r--r--sandbox_ui.lv2/sandbox_slave.c110
7 files changed, 314 insertions, 192 deletions
diff --git a/VERSION b/VERSION
index 773523a7..1382254c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.6395
+0.1.6397
diff --git a/bin/synthpod_alsa.c b/bin/synthpod_alsa.c
index 3f0d45bf..a1eea78a 100644
--- a/bin/synthpod_alsa.c
+++ b/bin/synthpod_alsa.c
@@ -908,6 +908,82 @@ _osc_schedule_frames2osc(LV2_OSC_Schedule_Handle instance, double frames)
return timestamp;
}
+static void
+_header()
+{
+ fprintf(stderr,
+ "Synthpod "SYNTHPOD_VERSION"\n"
+ "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
+ "Released under GNU General Public License 3 by Open Music Kontrollers\n");
+}
+
+static void
+_version()
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "This program is free software; you can redistribute it and/or modify\n"
+ "it under the terms of the GNU General Public License as published by\n"
+ "the Free Software Foundation; either version 3 of the License, or\n"
+ "(at your option) any later version.\n"
+ "\n"
+ "This program is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "GNU General Public License for more details.\n"
+ "\n"
+ "You should have received a copy of the GNU General Public License\n"
+ "along with this program. If not, see http://www.gnu.org/licenses.\n\n");
+}
+
+static void
+_usage(char **argv)
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "USAGE\n"
+ " %s [OPTIONS] [BUNDLE_PATH]\n"
+ "\n"
+ "OPTIONS\n"
+ " [-v] print version and full license information\n"
+ " [-h] print usage information\n"
+ " [-g] load GUI\n"
+ " [-G] do NOT load GUI (default)\n"
+ " [-k] kill DSP with GUI\n"
+ " [-K] do NOT kill DSP with GUI (default)\n"
+ " [-t] run GUI in threaded mode\n"
+ " [-T] run GUI in separate process (default)\n"
+ " [-b] enable bad plugins\n"
+ " [-B] disable bad plugins (default)\n"
+ " [-a] enable CPU affinity\n"
+ " [-A] disable CPU affinity (default)\n"
+ " [-I] disable capture\n"
+ " [-O] disable playback\n"
+ " [-2] force 2 channel mode\n"
+ " [-x] notify about XRuns\n"
+ " [-X] do NOT notify about XRuns (default)\n"
+ " [-y] audio-priority audio thread realtime priority (70)\n"
+ " [-Y] do NOT use audio thread realtime priority\n"
+ " [-w] worker-priority worker thread realtime priority (60)\n"
+ " [-W] do NOT use worker thread realtime priority\n"
+ " [-u] show alternate UI\n"
+ " [-l] link-path socket link path (shm:///synthpod)\n"
+ " [-d] device capture/playback device (\"hw:0\")\n"
+ " [-i] capture-device capture device (\"hw:0\")\n"
+ " [-o] playback-device playback device (\"hw:0\")\n"
+ " [-r] sample-rate sample rate (48000)\n"
+ " [-p] sample-period frames per period (1024)\n"
+ " [-n] period-number number of periods of playback latency (3)\n"
+ " [-s] sequence-size minimum sequence size (8192)\n"
+ " [-c] slave-cores number of slave cores (auto)\n"
+ " [-f] update-rate GUI update rate (25)\n\n"
+ , argv[0]);
+}
+
int
main(int argc, char **argv)
{
@@ -941,10 +1017,7 @@ main(int argc, char **argv)
bin->update_rate = 25;
bin->cpu_affinity = false;
- fprintf(stderr,
- "Synthpod "SYNTHPOD_VERSION"\n"
- "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
- "Released under GNU General Public License 3 by Open Music Kontrollers\n");
+ bool quiet = false;
// read local configuration if present
/*FIXME
@@ -952,67 +1025,19 @@ main(int argc, char **argv)
*/
int c;
- while((c = getopt(argc, argv, "vhgGbkKtTBaAIO2xXy:Yw:Wul:d:i:o:r:p:n:s:c:f:")) != -1)
+ while((c = getopt(argc, argv, "vhqgGbkKtTBaAIO2xXy:Yw:Wul:d:i:o:r:p:n:s:c:f:")) != -1)
{
switch(c)
{
case 'v':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "This program is free software; you can redistribute it and/or modify\n"
- "it under the terms of the GNU General Public License as published by\n"
- "the Free Software Foundation; either version 3 of the License, or\n"
- "(at your option) any later version.\n"
- "\n"
- "This program is distributed in the hope that it will be useful,\n"
- "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "GNU General Public License for more details.\n"
- "\n"
- "You should have received a copy of the GNU General Public License\n"
- "along with this program. If not, see http://www.gnu.org/licenses.\n\n");
+ _version();
return 0;
case 'h':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "USAGE\n"
- " %s [OPTIONS] [BUNDLE_PATH]\n"
- "\n"
- "OPTIONS\n"
- " [-v] print version and full license information\n"
- " [-h] print usage information\n"
- " [-g] load GUI\n"
- " [-G] do NOT load GUI (default)\n"
- " [-k] kill DSP with GUI\n"
- " [-K] do NOT kill DSP with GUI (default)\n"
- " [-t] run GUI in threaded mode\n"
- " [-T] run GUI in separate process (default)\n"
- " [-b] enable bad plugins\n"
- " [-B] disable bad plugins (default)\n"
- " [-a] enable CPU affinity\n"
- " [-A] disable CPU affinity (default)\n"
- " [-I] disable capture\n"
- " [-O] disable playback\n"
- " [-2] force 2 channel mode\n"
- " [-x] notify about XRuns\n"
- " [-X] do NOT notify about XRuns (default)\n"
- " [-y] audio-priority audio thread realtime priority (70)\n"
- " [-Y] do NOT use audio thread realtime priority\n"
- " [-w] worker-priority worker thread realtime priority (60)\n"
- " [-W] do NOT use worker thread realtime priority\n"
- " [-u] show alternate UI\n"
- " [-l] link-path socket link path (shm:///synthpod)\n"
- " [-d] device capture/playback device (\"hw:0\")\n"
- " [-i] capture-device capture device (\"hw:0\")\n"
- " [-o] playback-device playback device (\"hw:0\")\n"
- " [-r] sample-rate sample rate (48000)\n"
- " [-p] sample-period frames per period (1024)\n"
- " [-n] period-number number of periods of playback latency (3)\n"
- " [-s] sequence-size minimum sequence size (8192)\n"
- " [-c] slave-cores number of slave cores (auto)\n"
- " [-f] update-rate GUI update rate (25)\n\n"
- , argv[0]);
+ _usage(argv);
return 0;
+ case 'q':
+ quiet = true;
+ break;
case 'g':
bin->has_gui = true;
break;
@@ -1123,6 +1148,11 @@ main(int argc, char **argv)
}
}
+ if(!quiet)
+ {
+ _header();
+ }
+
if(!handle.capt_name && handle.do_capt)
handle.capt_name = handle.io_name;
if(!handle.play_name && handle.do_play)
diff --git a/bin/synthpod_bin.c b/bin/synthpod_bin.c
index bc04ccc7..bf58f994 100644
--- a/bin/synthpod_bin.c
+++ b/bin/synthpod_bin.c
@@ -704,6 +704,7 @@ _bin_show_ipc(bin_t *bin)
"-m", minimum,
"-r", srate,
"-f", urate,
+ "-q",
NULL
};
diff --git a/bin/synthpod_dummy.c b/bin/synthpod_dummy.c
index 99cf8d99..a66a332f 100644
--- a/bin/synthpod_dummy.c
+++ b/bin/synthpod_dummy.c
@@ -453,6 +453,73 @@ _osc_schedule_frames2osc(LV2_OSC_Schedule_Handle instance, double frames)
return timestamp;
}
+static void
+_header()
+{
+ fprintf(stderr,
+ "Synthpod "SYNTHPOD_VERSION"\n"
+ "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
+ "Released under Artistic License 2.0 by Open Music Kontrollers\n");
+}
+
+static void
+_version()
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "This is free software: you can redistribute it and/or modify\n"
+ "it under the terms of the Artistic License 2.0 as published by\n"
+ "The Perl Foundation.\n"
+ "\n"
+ "This source is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "Artistic License 2.0 for more details.\n"
+ "\n"
+ "You should have received a copy of the Artistic License 2.0\n"
+ "along the source as a COPYING file. If not, obtain it from\n"
+ "http://www.perlfoundation.org/artistic_license_2_0.\n\n");
+}
+
+static void
+_usage(char **argv)
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "USAGE\n"
+ " %s [OPTIONS] [BUNDLE_PATH]\n"
+ "\n"
+ "OPTIONS\n"
+ " [-v] print version and full license information\n"
+ " [-h] print usage information\n"
+ " [-g] load GUI\n"
+ " [-G] do NOT load GUI (default)\n"
+ " [-k] kill DSP with GUI\n"
+ " [-K] do NOT kill DSP with GUI (default)\n"
+ " [-t] run GUI in threaded mode\n"
+ " [-T] run GUI in separate process (default)\n"
+ " [-b] enable bad plugins\n"
+ " [-B] disable bad plugins (default)\n"
+ " [-a] enable CPU affinity\n"
+ " [-A] disable CPU affinity (default)\n"
+ " [-y] audio-priority audio thread realtime priority (70)\n"
+ " [-Y] do NOT use audio thread realtime priority\n"
+ " [-w] worker-priority worker thread realtime priority (60)\n"
+ " [-W] do NOT use worker thread realtime priority\n"
+ " [-u] show alternate UI\n"
+ " [-l] link-path socket link path (shm:///synthpod)\n"
+ " [-r] sample-rate sample rate (48000)\n"
+ " [-p] sample-period frames per period (1024)\n"
+ " [-s] sequence-size minimum sequence size (8192)\n"
+ " [-c] slave-cores number of slave cores (auto)\n"
+ " [-f] update-rate GUI update rate (25)\n\n"
+ , argv[0]);
+}
+
int
main(int argc, char **argv)
{
@@ -477,64 +544,22 @@ main(int argc, char **argv)
bin->update_rate = 25;
bin->cpu_affinity = false;
- fprintf(stderr,
- "Synthpod "SYNTHPOD_VERSION"\n"
- "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
- "Released under Artistic License 2.0 by Open Music Kontrollers\n");
+ bool quiet = false;
int c;
- while((c = getopt(argc, argv, "vhgGkKtTbBaAy:Yw:Wul:r:p:s:c:f:")) != -1)
+ while((c = getopt(argc, argv, "vhqgGkKtTbBaAy:Yw:Wul:r:p:s:c:f:")) != -1)
{
switch(c)
{
case 'v':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "This is free software: you can redistribute it and/or modify\n"
- "it under the terms of the Artistic License 2.0 as published by\n"
- "The Perl Foundation.\n"
- "\n"
- "This source is distributed in the hope that it will be useful,\n"
- "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "Artistic License 2.0 for more details.\n"
- "\n"
- "You should have received a copy of the Artistic License 2.0\n"
- "along the source as a COPYING file. If not, obtain it from\n"
- "http://www.perlfoundation.org/artistic_license_2_0.\n\n");
+ _version();
return 0;
case 'h':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "USAGE\n"
- " %s [OPTIONS] [BUNDLE_PATH]\n"
- "\n"
- "OPTIONS\n"
- " [-v] print version and full license information\n"
- " [-h] print usage information\n"
- " [-g] load GUI\n"
- " [-G] do NOT load GUI (default)\n"
- " [-k] kill DSP with GUI\n"
- " [-K] do NOT kill DSP with GUI (default)\n"
- " [-t] run GUI in threaded mode\n"
- " [-T] run GUI in separate process (default)\n"
- " [-b] enable bad plugins\n"
- " [-B] disable bad plugins (default)\n"
- " [-a] enable CPU affinity\n"
- " [-A] disable CPU affinity (default)\n"
- " [-y] audio-priority audio thread realtime priority (70)\n"
- " [-Y] do NOT use audio thread realtime priority\n"
- " [-w] worker-priority worker thread realtime priority (60)\n"
- " [-W] do NOT use worker thread realtime priority\n"
- " [-u] show alternate UI\n"
- " [-l] link-path socket link path (shm:///synthpod)\n"
- " [-r] sample-rate sample rate (48000)\n"
- " [-p] sample-period frames per period (1024)\n"
- " [-s] sequence-size minimum sequence size (8192)\n"
- " [-c] slave-cores number of slave cores (auto)\n"
- " [-f] update-rate GUI update rate (25)\n\n"
- , argv[0]);
+ _usage(argv);
return 0;
+ case 'q':
+ quiet = true;
+ break;
case 'g':
bin->has_gui = true;
break;
@@ -613,6 +638,11 @@ main(int argc, char **argv)
}
}
+ if(!quiet)
+ {
+ _header();
+ }
+
bin_init(bin, handle.srate);
LV2_URID_Map *map = bin->map;
diff --git a/bin/synthpod_jack.c b/bin/synthpod_jack.c
index 1f27ce81..a9f1de2e 100644
--- a/bin/synthpod_jack.c
+++ b/bin/synthpod_jack.c
@@ -1027,6 +1027,68 @@ _osc_schedule_frames2osc(LV2_OSC_Schedule_Handle instance, double frames)
return timestamp;
}
+static void
+_header()
+{
+ fprintf(stderr,
+ "Synthpod "SYNTHPOD_VERSION"\n"
+ "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
+ "Released under Artistic License 2.0 by Open Music Kontrollers\n");
+}
+
+static void
+_version()
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "This is free software: you can redistribute it and/or modify\n"
+ "it under the terms of the Artistic License 2.0 as published by\n"
+ "The Perl Foundation.\n"
+ "\n"
+ "This source is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "Artistic License 2.0 for more details.\n"
+ "\n"
+ "You should have received a copy of the Artistic License 2.0\n"
+ "along the source as a COPYING file. If not, obtain it from\n"
+ "http://www.perlfoundation.org/artistic_license_2_0.\n\n");
+}
+
+static void
+_usage(char **argv)
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "USAGE\n"
+ " %s [OPTIONS] [BUNDLE_PATH]\n"
+ "\n"
+ "OPTIONS\n"
+ " [-v] print version and full license information\n"
+ " [-h] print usage information\n"
+ " [-g] load GUI\n"
+ " [-G] do NOT load GUI (default)\n"
+ " [-k] kill DSP with GUI\n"
+ " [-K] do NOT kill DSP with GUI (default)\n"
+ " [-t] run GUI in threaded mode\n"
+ " [-T] run GUI in separate process (default)\n"
+ " [-b] enable bad plugins\n"
+ " [-B] disable bad plugins (default)\n"
+ " [-a] enable CPU affinity\n"
+ " [-A] disable CPU affinity (default)\n"
+ " [-u] show alternate UI\n"
+ " [-l] link-path socket link path (shm:///synthpod)\n"
+ " [-n] server-name connect to named JACK daemon\n"
+ " [-s] sequence-size minimum sequence size (8192)\n"
+ " [-c] slave-cores number of slave cores (auto)\n"
+ " [-f] update-rate GUI update rate (25)\n\n"
+ , argv[0]);
+}
+
int
main(int argc, char **argv)
{
@@ -1049,59 +1111,22 @@ main(int argc, char **argv)
bin->update_rate = 25;
bin->cpu_affinity = false;
- fprintf(stderr,
- "Synthpod "SYNTHPOD_VERSION"\n"
- "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
- "Released under Artistic License 2.0 by Open Music Kontrollers\n");
+ bool quiet = false;
int c;
- while((c = getopt(argc, argv, "vhgGkKtTbBaAul:n:s:c:f:")) != -1)
+ while((c = getopt(argc, argv, "vhqgGkKtTbBaAul:n:s:c:f:")) != -1)
{
switch(c)
{
case 'v':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "This is free software: you can redistribute it and/or modify\n"
- "it under the terms of the Artistic License 2.0 as published by\n"
- "The Perl Foundation.\n"
- "\n"
- "This source is distributed in the hope that it will be useful,\n"
- "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "Artistic License 2.0 for more details.\n"
- "\n"
- "You should have received a copy of the Artistic License 2.0\n"
- "along the source as a COPYING file. If not, obtain it from\n"
- "http://www.perlfoundation.org/artistic_license_2_0.\n\n");
+ _version();
return 0;
case 'h':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "USAGE\n"
- " %s [OPTIONS] [BUNDLE_PATH]\n"
- "\n"
- "OPTIONS\n"
- " [-v] print version and full license information\n"
- " [-h] print usage information\n"
- " [-g] load GUI\n"
- " [-G] do NOT load GUI (default)\n"
- " [-k] kill DSP with GUI\n"
- " [-K] do NOT kill DSP with GUI (default)\n"
- " [-t] run GUI in threaded mode\n"
- " [-T] run GUI in separate process (default)\n"
- " [-b] enable bad plugins\n"
- " [-B] disable bad plugins (default)\n"
- " [-a] enable CPU affinity\n"
- " [-A] disable CPU affinity (default)\n"
- " [-u] show alternate UI\n"
- " [-l] link-path socket link path (shm:///synthpod)\n"
- " [-n] server-name connect to named JACK daemon\n"
- " [-s] sequence-size minimum sequence size (8192)\n"
- " [-c] slave-cores number of slave cores (auto)\n"
- " [-f] update-rate GUI update rate (25)\n\n"
- , argv[0]);
+ _usage(argv);
return 0;
+ case 'q':
+ quiet = true;
+ break;
case 'g':
bin->has_gui = true;
break;
@@ -1165,6 +1190,11 @@ main(int argc, char **argv)
}
}
+ if(!quiet)
+ {
+ _header();
+ }
+
if(_jack_probe_prio(&handle))
{
fprintf(stderr, "Unable to probe JACK for thread priorities\n");
diff --git a/plugins/synthpod_common_nk.c b/plugins/synthpod_common_nk.c
index 019c05bc..14ef4952 100644
--- a/plugins/synthpod_common_nk.c
+++ b/plugins/synthpod_common_nk.c
@@ -3184,6 +3184,7 @@ _mod_ui_run(mod_ui_t *mod_ui, bool sync)
"-m", mod_ui->sbox.minimum,
"-r", mod_ui->sbox.sample_rate,
"-f", mod_ui->sbox.update_rate,
+ "-q",
NULL
};
diff --git a/sandbox_ui.lv2/sandbox_slave.c b/sandbox_ui.lv2/sandbox_slave.c
index 91472f4e..0c01f5aa 100644
--- a/sandbox_ui.lv2/sandbox_slave.c
+++ b/sandbox_ui.lv2/sandbox_slave.c
@@ -535,6 +535,64 @@ _voice_map_new_uuid(void *data, uint32_t flags __attribute__((unused)))
return xpress_map(xpress);
}
+static void
+_header()
+{
+ fprintf(stderr,
+ "Synthpod "SYNTHPOD_VERSION"\n"
+ "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
+ "Released under Artistic License 2.0 by Open Music Kontrollers\n");
+}
+
+static void
+_version()
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "This is free software: you can redistribute it and/or modify\n"
+ "it under the terms of the Artistic License 2.0 as published by\n"
+ "The Perl Foundation.\n"
+ "\n"
+ "This source is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "Artistic License 2.0 for more details.\n"
+ "\n"
+ "You should have received a copy of the Artistic License 2.0\n"
+ "along the source as a COPYING file. If not, obtain it from\n"
+ "http://www.perlfoundation.org/artistic_license_2_0.\n\n");
+}
+
+static void
+_usage(char **argv)
+{
+ _header();
+
+ fprintf(stderr,
+ "--------------------------------------------------------------------\n"
+ "USAGE\n"
+ " %s [OPTIONS]\n"
+ "\n"
+ "OPTIONS\n"
+ " [-v] Print version and full license information\n"
+ " [-h] Print usage information\n"
+ " [-q] Quiet output\n"
+ " [-t] Testing mode\n\n"
+ " [-n] plugin-urn Plugin URN\n"
+ " [-p] plugin-uri Plugin URI\n"
+ " [-P] plugin-bundle Plugin bundle path\n"
+ " [-u] ui-uri Plugin UI URI\n"
+ " [-U] ui-bundle Plugin UI bundle path\n"
+ " [-s] socket-path Socket path\n"
+ " [-w] window-title Window title\n"
+ " [-m] minimum-size Minimum ringbuffer size\n"
+ " [-r] sample-rate Sample rate (44100)\n"
+ " [-f] update-rate GUI update rate (25)\n\n"
+ , argv[0]);
+}
+
sandbox_slave_t *
sandbox_slave_new(int argc, char **argv, const sandbox_slave_driver_t *driver,
void *data, int *res)
@@ -547,6 +605,7 @@ sandbox_slave_new(int argc, char **argv, const sandbox_slave_driver_t *driver,
}
bool testing = false;
+ bool quiet = false;
sb->plugin_urn = NULL;
sb->window_title = "Untitled"; // fall-back
sb->minimum = 0x100000; // fall-back
@@ -556,58 +615,24 @@ sandbox_slave_new(int argc, char **argv, const sandbox_slave_driver_t *driver,
sb->background_color = 0x222222ff; // fall-back
sb->foreground_color = 0xccccccff; // fall-back
- fprintf(stderr,
- "Synthpod "SYNTHPOD_VERSION"\n"
- "Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)\n"
- "Released under Artistic License 2.0 by Open Music Kontrollers\n");
-
optind = 1; // needed when called from thread that already ran getopt
int c;
- while((c = getopt(argc, argv, "vhtn:p:P:u:U:s:w:m:r:f:")) != -1)
+ while((c = getopt(argc, argv, "vhqtn:p:P:u:U:s:w:m:r:f:")) != -1)
{
switch(c)
{
case 'v':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "This is free software: you can redistribute it and/or modify\n"
- "it under the terms of the Artistic License 2.0 as published by\n"
- "The Perl Foundation.\n"
- "\n"
- "This source is distributed in the hope that it will be useful,\n"
- "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "Artistic License 2.0 for more details.\n"
- "\n"
- "You should have received a copy of the Artistic License 2.0\n"
- "along the source as a COPYING file. If not, obtain it from\n"
- "http://www.perlfoundation.org/artistic_license_2_0.\n\n");
+ _version();
*res = EXIT_SUCCESS;
return NULL;
case 'h':
- fprintf(stderr,
- "--------------------------------------------------------------------\n"
- "USAGE\n"
- " %s [OPTIONS]\n"
- "\n"
- "OPTIONS\n"
- " [-v] Print version and full license information\n"
- " [-h] Print usage information\n"
- " [-t] Testing mode\n\n"
- " [-n] plugin-urn Plugin URN\n"
- " [-p] plugin-uri Plugin URI\n"
- " [-P] plugin-bundle Plugin bundle path\n"
- " [-u] ui-uri Plugin UI URI\n"
- " [-U] ui-bundle Plugin UI bundle path\n"
- " [-s] socket-path Socket path\n"
- " [-w] window-title Window title\n"
- " [-m] minimum-size Minimum ringbuffer size\n"
- " [-r] sample-rate Sample rate (44100)\n"
- " [-f] update-rate GUI update rate (25)\n\n"
- , argv[0]);
+ _usage(argv);
*res = EXIT_SUCCESS;
return NULL;
+ case 'q':
+ quiet = true;
+ break;
case 't':
testing = true;
break;
@@ -660,6 +685,11 @@ sandbox_slave_new(int argc, char **argv, const sandbox_slave_driver_t *driver,
}
}
+ if(!quiet)
+ {
+ _header();
+ }
+
if( !sb->plugin_uri
|| !sb->plugin_bundle_path
|| !sb->ui_uri