summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/engine/EventSink.cpp10
-rw-r--r--src/engine/EventSink.hpp3
-rw-r--r--src/engine/JackAudioDriver.cpp8
-rw-r--r--src/engine/JackAudioDriver.hpp4
-rw-r--r--src/engine/PortImpl.cpp1
-rw-r--r--src/engine/wscript73
-rw-r--r--src/ingen/cmdline.c202
-rw-r--r--src/ingen/cmdline.ggo7
-rw-r--r--src/ingen/cmdline.h32
-rw-r--r--src/ingen/main.cpp7
10 files changed, 207 insertions, 140 deletions
diff --git a/src/engine/EventSink.cpp b/src/engine/EventSink.cpp
index 6c775d4c..5e7305e4 100644
--- a/src/engine/EventSink.cpp
+++ b/src/engine/EventSink.cpp
@@ -16,7 +16,6 @@
*/
#include <iostream>
-#include "events/SendPortValueEvent.hpp"
#include "EventSink.hpp"
#include "PortImpl.hpp"
@@ -24,15 +23,6 @@ using namespace std;
namespace Ingen {
-#if 0
-void
-EventSink::control_change(Port* port, FrameTime time, float val)
-{
- //cerr << "CONTROL CHANGE: " << port->path() << " == " << val << endl;
- SendPortValueEvent ev(_engine, time, port, false, 0, val);
- _events.write(sizeof(ev), (uchar*)&ev);
-}
-#endif
/** \a size is not size_t because an event will never be even remotely close
* to UINT32_MAX in size, so uint32_t saves wasted space on 64-bit.
diff --git a/src/engine/EventSink.hpp b/src/engine/EventSink.hpp
index 9e937d1a..72341b7b 100644
--- a/src/engine/EventSink.hpp
+++ b/src/engine/EventSink.hpp
@@ -21,14 +21,13 @@
#include <list>
#include <utility>
#include <raul/RingBuffer.hpp>
-#include "events/SendPortValueEvent.hpp"
#include "types.hpp"
namespace Ingen {
class PortImpl;
class Engine;
-class SendPortValueEvent;
+class Event;
/** Sink for events generated in the audio thread.
diff --git a/src/engine/JackAudioDriver.cpp b/src/engine/JackAudioDriver.cpp
index 15c8f785..f0c402d9 100644
--- a/src/engine/JackAudioDriver.cpp
+++ b/src/engine/JackAudioDriver.cpp
@@ -97,6 +97,7 @@ JackAudioPort::prepare_buffer(jack_nframes_t nframes)
JackAudioDriver::JackAudioDriver(Engine& engine,
std::string server_name,
+ std::string client_name,
jack_client_t* jack_client)
: _engine(engine)
, _jack_thread(NULL)
@@ -111,7 +112,7 @@ JackAudioDriver::JackAudioDriver(Engine& engine,
if (!_client) {
// Try supplied server name
if (server_name != "") {
- _client = jack_client_open("Ingen", JackServerName, NULL, server_name.c_str());
+ _client = jack_client_open(client_name.c_str(), JackServerName, NULL, server_name.c_str());
if (_client)
cerr << "[JackAudioDriver] Connected to JACK server '" <<
server_name << "'" << endl;
@@ -120,7 +121,7 @@ JackAudioDriver::JackAudioDriver(Engine& engine,
// Either server name not specified, or supplied server name does not exist
// Connect to default server
if (!_client) {
- _client = jack_client_open("Ingen", JackNullOption, NULL);
+ _client = jack_client_open(client_name.c_str(), JackNullOption, NULL);
if (_client)
cerr << "[JackAudioDriver] Connected to default JACK server." << endl;
@@ -390,8 +391,9 @@ Ingen::JackAudioDriver*
new_jack_audio_driver(
Ingen::Engine& engine,
std::string server_name,
+ std::string client_name,
jack_client_t* jack_client)
{
- return new Ingen::JackAudioDriver(engine, server_name, jack_client);
+ return new Ingen::JackAudioDriver(engine, server_name, client_name, jack_client);
}
diff --git a/src/engine/JackAudioDriver.hpp b/src/engine/JackAudioDriver.hpp
index 8cf2e5d3..56ae066b 100644
--- a/src/engine/JackAudioDriver.hpp
+++ b/src/engine/JackAudioDriver.hpp
@@ -73,7 +73,8 @@ class JackAudioDriver : public AudioDriver
{
public:
JackAudioDriver(Engine& engine,
- std::string server_name = "",
+ std::string server_name = "default",
+ std::string client_name = "ingen",
jack_client_t* jack_client = 0);
~JackAudioDriver();
@@ -187,6 +188,7 @@ extern "C" {
extern Ingen::JackAudioDriver* new_jack_audio_driver(
Ingen::Engine& engine,
std::string server_name = "",
+ std::string client_name = "",
jack_client_t* jack_client = 0);
}
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index 49887453..d807304e 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -24,6 +24,7 @@
#include "AudioBuffer.hpp"
#include "EventBuffer.hpp"
#include "ProcessContext.hpp"
+#include "events/SendPortValueEvent.hpp"
#include "events/SendPortActivityEvent.hpp"
using namespace std;
diff --git a/src/engine/wscript b/src/engine/wscript
index ad5c3a96..5bf263d3 100644
--- a/src/engine/wscript
+++ b/src/engine/wscript
@@ -35,38 +35,11 @@ def build(bld):
PostProcessor.cpp
ProcessSlave.cpp
QueuedEvent.cpp
- QueuedEventSource.cpp
TransportNode.cpp
ingen_engine.cpp
- events/AllNotesOffEvent.cpp
- events/ClearPatchEvent.cpp
- events/ConnectionEvent.cpp
- events/CreateNodeEvent.cpp
- events/CreatePatchEvent.cpp
- events/CreatePortEvent.cpp
- events/DeactivateEvent.cpp
- events/DestroyEvent.cpp
- events/DisconnectAllEvent.cpp
- events/DisconnectionEvent.cpp
- events/EnablePatchEvent.cpp
- events/LoadPluginsEvent.cpp
- events/MidiLearnEvent.cpp
- events/NoteEvent.cpp
- events/RegisterClientEvent.cpp
- events/RenameEvent.cpp
- events/RequestAllObjectsEvent.cpp
- events/RequestMetadataEvent.cpp
- events/RequestObjectEvent.cpp
- events/RequestPluginEvent.cpp
- events/RequestPluginsEvent.cpp
- events/RequestPortValueEvent.cpp
- events/SendPortActivityEvent.cpp
- events/SendPortValueEvent.cpp
- events/SetMetadataEvent.cpp
- events/SetPolyphonicEvent.cpp
- events/SetPolyphonyEvent.cpp
- events/SetPortValueEvent.cpp
- events/UnregisterClientEvent.cpp
+ events/SendPortActivityEvent.cpp
+ events/SendPortValueEvent.cpp
+
'''
if bld.env()['HAVE_LADSPA']:
obj.source += ' LADSPANode.cpp '
@@ -80,7 +53,43 @@ def build(bld):
autowaf.use_lib(bld, obj, core_libs)
if bld.env()['HAVE_SOUP'] or bld.env()['HAVE_LIBLO']:
- obj.source += ' QueuedEngineInterface.cpp '
+ obj = bld.create_obj('cpp', 'shlib')
+ obj.source = '''
+ events/SetPortValueEvent.cpp
+ QueuedEventSource.cpp
+ events/AllNotesOffEvent.cpp
+ events/ClearPatchEvent.cpp
+ events/ConnectionEvent.cpp
+ events/CreateNodeEvent.cpp
+ events/CreatePatchEvent.cpp
+ events/CreatePortEvent.cpp
+ events/DeactivateEvent.cpp
+ events/DestroyEvent.cpp
+ events/DisconnectAllEvent.cpp
+ events/DisconnectionEvent.cpp
+ events/EnablePatchEvent.cpp
+ events/LoadPluginsEvent.cpp
+ events/MidiLearnEvent.cpp
+ events/NoteEvent.cpp
+ events/RegisterClientEvent.cpp
+ events/RenameEvent.cpp
+ events/RequestAllObjectsEvent.cpp
+ events/RequestMetadataEvent.cpp
+ events/RequestObjectEvent.cpp
+ events/RequestPluginEvent.cpp
+ events/RequestPluginsEvent.cpp
+ events/RequestPortValueEvent.cpp
+
+ events/SetMetadataEvent.cpp
+ events/SetPolyphonicEvent.cpp
+ events/SetPolyphonyEvent.cpp
+ events/UnregisterClientEvent.cpp
+ '''
+ obj.includes = ['.', '..', '../common', './events', '../engine']
+ obj.name = 'libingen_engine_queued'
+ obj.target = 'ingen_engine_queued'
+ obj.inst_dir = 'lib/ingen'
+ autowaf.use_lib(bld, obj, core_libs)
if bld.env()['HAVE_SOUP']:
obj = bld.create_obj('cpp', 'shlib')
@@ -93,7 +102,7 @@ def build(bld):
if bld.env()['HAVE_LIBLO']:
obj = bld.create_obj('cpp', 'shlib')
- obj.source = 'OSCClientSender.cpp OSCEngineReceiver.cpp'
+ obj.source = 'QueuedEngineInterface.cpp OSCClientSender.cpp OSCEngineReceiver.cpp'
obj.includes = ['.', '..', '../common', './events', '../engine']
obj.name = 'libingen_engine_osc'
obj.target = 'ingen_engine_osc'
diff --git a/src/ingen/cmdline.c b/src/ingen/cmdline.c
index ea48135c..e8a6ab63 100644
--- a/src/ingen/cmdline.c
+++ b/src/ingen/cmdline.c
@@ -1,7 +1,7 @@
/*
- File autogenerated by gengetopt
+ File autogenerated by gengetopt version 2.22.1
generated with the following command:
- gengetopt -g
+ gengetopt -u
The developers of gengetopt consider the fixed text that goes in all
gengetopt output files to be in the public domain:
@@ -23,22 +23,23 @@
const char *gengetopt_args_info_purpose = "A modular realtime audio processing system";
-const char *gengetopt_args_info_usage = "Usage: ingen [OPTIONS]...";
+const char *gengetopt_args_info_usage = "Usage: ingen [OPTIONS]... [FILES]...";
const char *gengetopt_args_info_description = "Ingen can be run in various configurations. The engine can\nrun as a stand-alone server controlled by OSC, or internal to\nanother process (e.g. the GUI). The GUI can communicate with the engine\nvia either method, and many GUIs (or other things) may connect to an\nengine via OSC.\n\nExamples:\n\n ingen -e - Run an engine, listen for OSC \n ingen -g - Run a GUI, connect via OSC \n ingen -eg - Run an engine and a GUI in one process\n\nThe -l (load) option can be used in all cases:\n \n ingen -el patch.ingen.ttl - Run an engine and load a patch\n ingen -gl patch.ingen.ttl - Run a GUI and load a patch\n ingen -egl patch.ingen.ttl - Run an engine and a GUI and load a patch\n\nOptions:\n";
const char *gengetopt_args_info_help[] = {
- " -h, --help Print help and exit",
- " -V, --version Print version and exit",
- " -e, --engine Run (JACK) engine (default=off)",
- " -E, --engine-port=INT Engine OSC port (default=`16180')",
- " -c, --connect=STRING Connect to existing engine at OSC URI \n (default=`osc.udp://localhost:16180')",
- " -g, --gui Launch the GTK graphical interface (default=off)",
- " -C, --client-port=INT Client OSC port",
- " -l, --load=STRING Load patch",
- " -L, --path=STRING Target path for loaded patch",
- " -r, --run=STRING Run script",
- " -p, --parallelism=INT Number of concurrent process threads (default=`1')",
+ " -h, --help Print help and exit",
+ " -V, --version Print version and exit",
+ " -C, --client-port=INT Client OSC port",
+ " -c, --connect=STRING Connect to existing engine at OSC URI \n (default=`osc.udp://localhost:16180')",
+ " -e, --engine Run (JACK) engine (default=off)",
+ " -E, --engine-port=INT Engine OSC port (default=`16180')",
+ " -g, --gui Launch the GTK graphical interface (default=off)",
+ " -n, --jack-name=STRING JACK client name (default=`ingen')",
+ " -l, --load=STRING Load patch",
+ " -p, --parallelism=INT Number of concurrent process threads (default=`1')",
+ " -L, --path=STRING Target path for loaded patch",
+ " -r, --run=STRING Run script",
0
};
@@ -66,35 +67,38 @@ void clear_given (struct gengetopt_args_info *args_info)
{
args_info->help_given = 0 ;
args_info->version_given = 0 ;
+ args_info->client_port_given = 0 ;
+ args_info->connect_given = 0 ;
args_info->engine_given = 0 ;
args_info->engine_port_given = 0 ;
- args_info->connect_given = 0 ;
args_info->gui_given = 0 ;
- args_info->client_port_given = 0 ;
+ args_info->jack_name_given = 0 ;
args_info->load_given = 0 ;
+ args_info->parallelism_given = 0 ;
args_info->path_given = 0 ;
args_info->run_given = 0 ;
- args_info->parallelism_given = 0 ;
}
static
void clear_args (struct gengetopt_args_info *args_info)
{
+ args_info->client_port_orig = NULL;
+ args_info->connect_arg = gengetopt_strdup ("osc.udp://localhost:16180");
+ args_info->connect_orig = NULL;
args_info->engine_flag = 0;
args_info->engine_port_arg = 16180;
args_info->engine_port_orig = NULL;
- args_info->connect_arg = gengetopt_strdup ("osc.udp://localhost:16180");
- args_info->connect_orig = NULL;
args_info->gui_flag = 0;
- args_info->client_port_orig = NULL;
+ args_info->jack_name_arg = gengetopt_strdup ("ingen");
+ args_info->jack_name_orig = NULL;
args_info->load_arg = NULL;
args_info->load_orig = NULL;
+ args_info->parallelism_arg = 1;
+ args_info->parallelism_orig = NULL;
args_info->path_arg = NULL;
args_info->path_orig = NULL;
args_info->run_arg = NULL;
args_info->run_orig = NULL;
- args_info->parallelism_arg = 1;
- args_info->parallelism_orig = NULL;
}
@@ -105,15 +109,16 @@ void init_args_info(struct gengetopt_args_info *args_info)
args_info->help_help = gengetopt_args_info_help[0] ;
args_info->version_help = gengetopt_args_info_help[1] ;
- args_info->engine_help = gengetopt_args_info_help[2] ;
- args_info->engine_port_help = gengetopt_args_info_help[3] ;
- args_info->connect_help = gengetopt_args_info_help[4] ;
- args_info->gui_help = gengetopt_args_info_help[5] ;
- args_info->client_port_help = gengetopt_args_info_help[6] ;
- args_info->load_help = gengetopt_args_info_help[7] ;
- args_info->path_help = gengetopt_args_info_help[8] ;
- args_info->run_help = gengetopt_args_info_help[9] ;
- args_info->parallelism_help = gengetopt_args_info_help[10] ;
+ args_info->client_port_help = gengetopt_args_info_help[2] ;
+ args_info->connect_help = gengetopt_args_info_help[3] ;
+ args_info->engine_help = gengetopt_args_info_help[4] ;
+ args_info->engine_port_help = gengetopt_args_info_help[5] ;
+ args_info->gui_help = gengetopt_args_info_help[6] ;
+ args_info->jack_name_help = gengetopt_args_info_help[7] ;
+ args_info->load_help = gengetopt_args_info_help[8] ;
+ args_info->parallelism_help = gengetopt_args_info_help[9] ;
+ args_info->path_help = gengetopt_args_info_help[10] ;
+ args_info->run_help = gengetopt_args_info_help[11] ;
}
@@ -153,6 +158,9 @@ cmdline_parser_init (struct gengetopt_args_info *args_info)
clear_given (args_info);
clear_args (args_info);
init_args_info (args_info);
+
+ args_info->inputs = NULL;
+ args_info->inputs_num = 0;
}
void
@@ -191,20 +199,27 @@ free_string_field (char **s)
static void
cmdline_parser_release (struct gengetopt_args_info *args_info)
{
-
- free_string_field (&(args_info->engine_port_orig));
+ unsigned int i;
+ free_string_field (&(args_info->client_port_orig));
free_string_field (&(args_info->connect_arg));
free_string_field (&(args_info->connect_orig));
- free_string_field (&(args_info->client_port_orig));
+ free_string_field (&(args_info->engine_port_orig));
+ free_string_field (&(args_info->jack_name_arg));
+ free_string_field (&(args_info->jack_name_orig));
free_string_field (&(args_info->load_arg));
free_string_field (&(args_info->load_orig));
+ free_string_field (&(args_info->parallelism_orig));
free_string_field (&(args_info->path_arg));
free_string_field (&(args_info->path_orig));
free_string_field (&(args_info->run_arg));
free_string_field (&(args_info->run_orig));
- free_string_field (&(args_info->parallelism_orig));
+ for (i = 0; i < args_info->inputs_num; ++i)
+ free (args_info->inputs [i]);
+
+ if (args_info->inputs_num)
+ free (args_info->inputs);
clear_given (args_info);
}
@@ -236,24 +251,26 @@ cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
write_into_file(outfile, "help", 0, 0 );
if (args_info->version_given)
write_into_file(outfile, "version", 0, 0 );
+ if (args_info->client_port_given)
+ write_into_file(outfile, "client-port", args_info->client_port_orig, 0);
+ if (args_info->connect_given)
+ write_into_file(outfile, "connect", args_info->connect_orig, 0);
if (args_info->engine_given)
write_into_file(outfile, "engine", 0, 0 );
if (args_info->engine_port_given)
write_into_file(outfile, "engine-port", args_info->engine_port_orig, 0);
- if (args_info->connect_given)
- write_into_file(outfile, "connect", args_info->connect_orig, 0);
if (args_info->gui_given)
write_into_file(outfile, "gui", 0, 0 );
- if (args_info->client_port_given)
- write_into_file(outfile, "client-port", args_info->client_port_orig, 0);
+ if (args_info->jack_name_given)
+ write_into_file(outfile, "jack-name", args_info->jack_name_orig, 0);
if (args_info->load_given)
write_into_file(outfile, "load", args_info->load_orig, 0);
+ if (args_info->parallelism_given)
+ write_into_file(outfile, "parallelism", args_info->parallelism_orig, 0);
if (args_info->path_given)
write_into_file(outfile, "path", args_info->path_orig, 0);
if (args_info->run_given)
write_into_file(outfile, "run", args_info->run_orig, 0);
- if (args_info->parallelism_given)
- write_into_file(outfile, "parallelism", args_info->parallelism_orig, 0);
i = EXIT_SUCCESS;
@@ -504,19 +521,20 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
static struct option long_options[] = {
{ "help", 0, NULL, 'h' },
{ "version", 0, NULL, 'V' },
+ { "client-port", 1, NULL, 'C' },
+ { "connect", 1, NULL, 'c' },
{ "engine", 0, NULL, 'e' },
{ "engine-port", 1, NULL, 'E' },
- { "connect", 1, NULL, 'c' },
{ "gui", 0, NULL, 'g' },
- { "client-port", 1, NULL, 'C' },
+ { "jack-name", 1, NULL, 'n' },
{ "load", 1, NULL, 'l' },
+ { "parallelism", 1, NULL, 'p' },
{ "path", 1, NULL, 'L' },
{ "run", 1, NULL, 'r' },
- { "parallelism", 1, NULL, 'p' },
{ NULL, 0, NULL, 0 }
};
- c = getopt_long (argc, argv, "hVeE:c:gC:l:L:r:p:", long_options, &option_index);
+ c = getopt_long (argc, argv, "hVC:c:eE:gn:l:p:L:r:", long_options, &option_index);
if (c == -1) break; /* Exit from `while (1)' loop. */
@@ -532,6 +550,30 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
cmdline_parser_free (&local_args_info);
exit (EXIT_SUCCESS);
+ case 'C': /* Client OSC port. */
+
+
+ if (update_arg( (void *)&(args_info->client_port_arg),
+ &(args_info->client_port_orig), &(args_info->client_port_given),
+ &(local_args_info.client_port_given), optarg, 0, 0, ARG_INT,
+ check_ambiguity, override, 0, 0,
+ "client-port", 'C',
+ additional_error))
+ goto failure;
+
+ break;
+ case 'c': /* Connect to existing engine at OSC URI. */
+
+
+ if (update_arg( (void *)&(args_info->connect_arg),
+ &(args_info->connect_orig), &(args_info->connect_given),
+ &(local_args_info.connect_given), optarg, 0, "osc.udp://localhost:16180", ARG_STRING,
+ check_ambiguity, override, 0, 0,
+ "connect", 'c',
+ additional_error))
+ goto failure;
+
+ break;
case 'e': /* Run (JACK) engine. */
@@ -554,18 +596,6 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
goto failure;
break;
- case 'c': /* Connect to existing engine at OSC URI. */
-
-
- if (update_arg( (void *)&(args_info->connect_arg),
- &(args_info->connect_orig), &(args_info->connect_given),
- &(local_args_info.connect_given), optarg, 0, "osc.udp://localhost:16180", ARG_STRING,
- check_ambiguity, override, 0, 0,
- "connect", 'c',
- additional_error))
- goto failure;
-
- break;
case 'g': /* Launch the GTK graphical interface. */
@@ -576,14 +606,14 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
goto failure;
break;
- case 'C': /* Client OSC port. */
+ case 'n': /* JACK client name. */
- if (update_arg( (void *)&(args_info->client_port_arg),
- &(args_info->client_port_orig), &(args_info->client_port_given),
- &(local_args_info.client_port_given), optarg, 0, 0, ARG_INT,
+ if (update_arg( (void *)&(args_info->jack_name_arg),
+ &(args_info->jack_name_orig), &(args_info->jack_name_given),
+ &(local_args_info.jack_name_given), optarg, 0, "ingen", ARG_STRING,
check_ambiguity, override, 0, 0,
- "client-port", 'C',
+ "jack-name", 'n',
additional_error))
goto failure;
@@ -600,6 +630,18 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
goto failure;
break;
+ case 'p': /* Number of concurrent process threads. */
+
+
+ if (update_arg( (void *)&(args_info->parallelism_arg),
+ &(args_info->parallelism_orig), &(args_info->parallelism_given),
+ &(local_args_info.parallelism_given), optarg, 0, "1", ARG_INT,
+ check_ambiguity, override, 0, 0,
+ "parallelism", 'p',
+ additional_error))
+ goto failure;
+
+ break;
case 'L': /* Target path for loaded patch. */
@@ -624,18 +666,6 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
goto failure;
break;
- case 'p': /* Number of concurrent process threads. */
-
-
- if (update_arg( (void *)&(args_info->parallelism_arg),
- &(args_info->parallelism_orig), &(args_info->parallelism_given),
- &(local_args_info.parallelism_given), optarg, 0, "1", ARG_INT,
- check_ambiguity, override, 0, 0,
- "parallelism", 'p',
- additional_error))
- goto failure;
-
- break;
case 0: /* Long option with no short option */
case '?': /* Invalid option. */
@@ -656,6 +686,30 @@ cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_inf
if ( error )
return (EXIT_FAILURE);
+ if (optind < argc)
+ {
+ int i = 0 ;
+ int found_prog_name = 0;
+ /* whether program name, i.e., argv[0], is in the remaining args
+ (this may happen with some implementations of getopt,
+ but surely not with the one included by gengetopt) */
+
+ i = optind;
+ while (i < argc)
+ if (argv[i++] == argv[0]) {
+ found_prog_name = 1;
+ break;
+ }
+ i = 0;
+
+ args_info->inputs_num = argc - optind - found_prog_name;
+ args_info->inputs =
+ (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
+ while (optind < argc)
+ if (argv[optind++] != argv[0])
+ args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ;
+ }
+
return 0;
failure:
diff --git a/src/ingen/cmdline.ggo b/src/ingen/cmdline.ggo
index 994e6ff9..f639cd98 100644
--- a/src/ingen/cmdline.ggo
+++ b/src/ingen/cmdline.ggo
@@ -24,13 +24,14 @@ The -l (load) option can be used in all cases:
Options:
"
+option "client-port" C "Client OSC port" int no
+option "connect" c "Connect to existing engine at OSC URI" string no default="osc.udp://localhost:16180"
option "engine" e "Run (JACK) engine" flag off
option "engine-port" E "Engine OSC port" int no default="16180"
-option "connect" c "Connect to existing engine at OSC URI" string no default="osc.udp://localhost:16180"
option "gui" g "Launch the GTK graphical interface" flag off
-option "client-port" C "Client OSC port" int no
+option "jack-name" n "JACK client name" string no default="ingen"
option "load" l "Load patch" string no
+option "parallelism" p "Number of concurrent process threads" int no default="1"
option "path" L "Target path for loaded patch" string no
option "run" r "Run script" string no
-option "parallelism" p "Number of concurrent process threads" int no default="1"
diff --git a/src/ingen/cmdline.h b/src/ingen/cmdline.h
index 80358089..ee916423 100644
--- a/src/ingen/cmdline.h
+++ b/src/ingen/cmdline.h
@@ -1,6 +1,6 @@
/** @file cmdline.h
* @brief The header file for the command line option parser
- * generated by GNU Gengetopt
+ * generated by GNU Gengetopt version 2.22.1
* http://www.gnu.org/software/gengetopt.
* DO NOT modify this file, since it can be overwritten
* @author GNU Gengetopt by Lorenzo Bettini */
@@ -34,44 +34,50 @@ struct gengetopt_args_info
{
const char *help_help; /**< @brief Print help and exit help description. */
const char *version_help; /**< @brief Print version and exit help description. */
+ int client_port_arg; /**< @brief Client OSC port. */
+ char * client_port_orig; /**< @brief Client OSC port original value given at command line. */
+ const char *client_port_help; /**< @brief Client OSC port help description. */
+ char * connect_arg; /**< @brief Connect to existing engine at OSC URI (default='osc.udp://localhost:16180'). */
+ char * connect_orig; /**< @brief Connect to existing engine at OSC URI original value given at command line. */
+ const char *connect_help; /**< @brief Connect to existing engine at OSC URI help description. */
int engine_flag; /**< @brief Run (JACK) engine (default=off). */
const char *engine_help; /**< @brief Run (JACK) engine help description. */
int engine_port_arg; /**< @brief Engine OSC port (default='16180'). */
char * engine_port_orig; /**< @brief Engine OSC port original value given at command line. */
const char *engine_port_help; /**< @brief Engine OSC port help description. */
- char * connect_arg; /**< @brief Connect to existing engine at OSC URI (default='osc.udp://localhost:16180'). */
- char * connect_orig; /**< @brief Connect to existing engine at OSC URI original value given at command line. */
- const char *connect_help; /**< @brief Connect to existing engine at OSC URI help description. */
int gui_flag; /**< @brief Launch the GTK graphical interface (default=off). */
const char *gui_help; /**< @brief Launch the GTK graphical interface help description. */
- int client_port_arg; /**< @brief Client OSC port. */
- char * client_port_orig; /**< @brief Client OSC port original value given at command line. */
- const char *client_port_help; /**< @brief Client OSC port help description. */
+ char * jack_name_arg; /**< @brief JACK client name (default='ingen'). */
+ char * jack_name_orig; /**< @brief JACK client name original value given at command line. */
+ const char *jack_name_help; /**< @brief JACK client name help description. */
char * load_arg; /**< @brief Load patch. */
char * load_orig; /**< @brief Load patch original value given at command line. */
const char *load_help; /**< @brief Load patch help description. */
+ int parallelism_arg; /**< @brief Number of concurrent process threads (default='1'). */
+ char * parallelism_orig; /**< @brief Number of concurrent process threads original value given at command line. */
+ const char *parallelism_help; /**< @brief Number of concurrent process threads help description. */
char * path_arg; /**< @brief Target path for loaded patch. */
char * path_orig; /**< @brief Target path for loaded patch original value given at command line. */
const char *path_help; /**< @brief Target path for loaded patch help description. */
char * run_arg; /**< @brief Run script. */
char * run_orig; /**< @brief Run script original value given at command line. */
const char *run_help; /**< @brief Run script help description. */
- int parallelism_arg; /**< @brief Number of concurrent process threads (default='1'). */
- char * parallelism_orig; /**< @brief Number of concurrent process threads original value given at command line. */
- const char *parallelism_help; /**< @brief Number of concurrent process threads help description. */
unsigned int help_given ; /**< @brief Whether help was given. */
unsigned int version_given ; /**< @brief Whether version was given. */
+ unsigned int client_port_given ; /**< @brief Whether client-port was given. */
+ unsigned int connect_given ; /**< @brief Whether connect was given. */
unsigned int engine_given ; /**< @brief Whether engine was given. */
unsigned int engine_port_given ; /**< @brief Whether engine-port was given. */
- unsigned int connect_given ; /**< @brief Whether connect was given. */
unsigned int gui_given ; /**< @brief Whether gui was given. */
- unsigned int client_port_given ; /**< @brief Whether client-port was given. */
+ unsigned int jack_name_given ; /**< @brief Whether jack-name was given. */
unsigned int load_given ; /**< @brief Whether load was given. */
+ unsigned int parallelism_given ; /**< @brief Whether parallelism was given. */
unsigned int path_given ; /**< @brief Whether path was given. */
unsigned int run_given ; /**< @brief Whether run was given. */
- unsigned int parallelism_given ; /**< @brief Whether parallelism was given. */
+ char **inputs ; /**< @brief unamed options (options without names) */
+ unsigned inputs_num ; /**< @brief unamed options number */
} ;
/** @brief The additional parameters to pass to parser functions */
diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp
index 4c958606..0b2ed83e 100644
--- a/src/ingen/main.cpp
+++ b/src/ingen/main.cpp
@@ -77,7 +77,7 @@ main(int argc, char** argv)
if (argc <= 1) {
cmdline_parser_print_help();
cerr << endl << "*** Ingen requires at least one command line parameter" << endl;
- cerr << "*** Just want to use a graphical app? Try 'ingen -eg'" << endl;
+ cerr << "*** Just want a graphical application? Try 'ingen -eg'" << endl;
return 1;
} else if (args.connect_given && args.engine_flag) {
cerr << "\n*** Nonsense arguments, can't both run a local engine "
@@ -109,6 +109,7 @@ main(int argc, char** argv)
world->rdf_world->add_prefix("ingen", "http://drobilla.net/ns/ingen#");
world->rdf_world->add_prefix("ingenuity", "http://drobilla.net/ns/ingenuity#");
world->rdf_world->add_prefix("lv2", "http://lv2plug.in/ns/lv2core#");
+ world->rdf_world->add_prefix("lv2ev", "http://lv2plug.in/ns/ext/event#");
world->rdf_world->add_prefix("lv2var", "http://lv2plug.in/ns/ext/instance-var#");
world->rdf_world->add_prefix("lv2_midi", "http://lv2plug.in/ns/ext/midi");
world->rdf_world->add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#");
@@ -193,9 +194,11 @@ main(int argc, char** argv)
Ingen::JackAudioDriver* (*new_driver)(
Ingen::Engine& engine,
std::string server_name,
+ std::string client_name,
jack_client_t* jack_client) = NULL;
if (engine_jack_module->get_symbol("new_jack_audio_driver", (void*&)new_driver))
- engine->set_driver(DataType::AUDIO, SharedPtr<Driver>(new_driver(*engine, "default", 0)));
+ engine->set_driver(DataType::AUDIO, SharedPtr<Driver>(new_driver(
+ *engine, "default", args.jack_name_arg, NULL)));
engine->activate(args.parallelism_arg);
}