diff options
author | David Robillard <d@drobilla.net> | 2007-06-24 17:05:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-24 17:05:42 +0000 |
commit | 06548d893646764cbda3bef2f440b953b1716ae5 (patch) | |
tree | 2092373f6c9fe9e07afc77cfdd3b00180d7614c3 /src/progs | |
parent | 433b5c46520b16882cb2a79f9d44840037ec914d (diff) | |
download | ingen-06548d893646764cbda3bef2f440b953b1716ae5.tar.gz ingen-06548d893646764cbda3bef2f440b953b1716ae5.tar.bz2 ingen-06548d893646764cbda3bef2f440b953b1716ae5.zip |
Fix running GUI with internal engine and direct interface (i.e. no OSC) with ingen -eg.
git-svn-id: http://svn.drobilla.net/lad/ingen@543 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r-- | src/progs/ingen/main.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/progs/ingen/main.cpp b/src/progs/ingen/main.cpp index 365230bb..46e0a1c3 100644 --- a/src/progs/ingen/main.cpp +++ b/src/progs/ingen/main.cpp @@ -102,11 +102,12 @@ main(int argc, char** argv) }*/ } else { cerr << "Unable to load engine module, engine not loaded." << endl; - cerr << "Try running ingen_dev or setting INGEN_MODULE_PATH." << endl; + cerr << "Try using src/set_dev_environment.sh, or setting INGEN_MODULE_PATH." << endl; } } + bool use_osc = false; /* Connect to remote engine */ if (args.connect_given || (args.load_given && !engine_interface)) { @@ -120,20 +121,25 @@ main(int argc, char** argv) if (client_module && found) { engine_interface = new_osc_interface(args.connect_arg); + use_osc = true; } else { cerr << "Unable to load ingen_client module, aborting." << endl; + cerr << "Try using src/set_dev_environment.sh, or setting INGEN_MODULE_PATH." << endl; return -1; } } + /* Load queued (direct in-process) engine interface */ + if (engine && !engine_interface && (args.load_given || args.gui_given)) + engine_interface = engine->new_queued_interface(); - if (engine) { + if (engine && engine_interface) { engine->start_jack_driver(); - engine->start_osc_driver(args.engine_port_arg); + if (use_osc) + engine->start_osc_driver(args.engine_port_arg); engine->activate(); } - /* Load a patch */ if (args.load_given && engine_interface) { @@ -174,6 +180,7 @@ main(int argc, char** argv) } else { cerr << "Unable to load serialisation module, aborting." << endl; + cerr << "Try using src/set_dev_environment.sh, or setting INGEN_MODULE_PATH." << endl; return -1; } } @@ -191,7 +198,7 @@ main(int argc, char** argv) run(argc, argv, engine, engine_interface); } else { cerr << "Unable to find GUI module, GUI not loaded." << endl; - cerr << "Try running ingen_dev or setting INGEN_MODULE_PATH." << endl; + cerr << "Try using src/set_dev_environment.sh, or setting INGEN_MODULE_PATH." << endl; } } @@ -199,10 +206,12 @@ main(int argc, char** argv) /* Didn't run the GUI, listen to OSC and do our own main thing. */ if (engine && !ran_gui) { + engine->start_jack_driver(); + signal(SIGINT, catch_int); signal(SIGTERM, catch_int); - //engine->start_osc_driver(args.engine_port_arg); + engine->start_osc_driver(args.engine_port_arg); engine->activate(); engine->main(); |