summaryrefslogtreecommitdiffstats
path: root/src/progs/server/main.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-12-12 12:45:33 +0000
committerDavid Robillard <d@drobilla.net>2006-12-12 12:45:33 +0000
commit71f632d459471c2e75ed04b808df9671539a182c (patch)
tree2fe3c25243e7b915656c02dd46bca5a0d317b599 /src/progs/server/main.cpp
parent9e2a757e026abf79d0cdcf12a18796fa89973356 (diff)
downloadingen-71f632d459471c2e75ed04b808df9671539a182c.tar.gz
ingen-71f632d459471c2e75ed04b808df9671539a182c.tar.bz2
ingen-71f632d459471c2e75ed04b808df9671539a182c.zip
Connection loading.
Command line parameter for server to allow connecting to specific JACK server. git-svn-id: http://svn.drobilla.net/lad/ingen@217 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/server/main.cpp')
-rw-r--r--src/progs/server/main.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/progs/server/main.cpp b/src/progs/server/main.cpp
index fa3548d3..73603e3a 100644
--- a/src/progs/server/main.cpp
+++ b/src/progs/server/main.cpp
@@ -22,6 +22,7 @@
#include "cmdline.h"
#include "tuning.h"
#include "Engine.h"
+#include "JackAudioDriver.h"
#include "OSCEngineReceiver.h"
#ifdef HAVE_LASH
#include "LashDriver.h"
@@ -139,11 +140,16 @@ main(int argc, char** argv)
engine = SharedPtr<Engine>(new Engine());
- OSCEngineReceiver* receiver = new OSCEngineReceiver(
- engine, pre_processor_queue_size, args_info.port_arg);
+ std::string jack_name
+ = (args_info.jack_server_given) ? args_info.jack_server_arg : "";
- receiver->activate();
- engine->set_event_source(receiver);
+ SharedPtr<AudioDriver> audio_driver(
+ new JackAudioDriver(*engine.get(), jack_name) );
+
+ SharedPtr<EventSource> event_source(new OSCEngineReceiver(
+ engine, pre_processor_queue_size, args_info.port_arg ));
+
+ engine->activate(audio_driver, event_source);
#ifdef HAVE_LASH
lash_driver = new LashDriver(engine, lash_args);
@@ -151,13 +157,12 @@ main(int argc, char** argv)
engine->main();
- receiver->deactivate();
+ event_source->deactivate();
#ifdef HAVE_LASH
delete lash_driver;
#endif
- delete receiver;
}
return ret;