diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/engine/DirectResponder.h | 3 | ||||
-rw-r--r-- | src/libs/engine/JackAudioDriver.cpp | 3 | ||||
-rw-r--r-- | src/libs/engine/QueuedEventSource.cpp | 5 | ||||
-rw-r--r-- | src/libs/engine/engine.cpp | 34 | ||||
-rw-r--r-- | src/libs/engine/engine.h | 5 | ||||
-rw-r--r-- | src/libs/gui/ConnectWindow.cpp | 3 | ||||
-rw-r--r-- | src/progs/ingen/main.cpp | 21 |
7 files changed, 27 insertions, 47 deletions
diff --git a/src/libs/engine/DirectResponder.h b/src/libs/engine/DirectResponder.h index 79dc1f81..1eceb80e 100644 --- a/src/libs/engine/DirectResponder.h +++ b/src/libs/engine/DirectResponder.h @@ -1,4 +1,3 @@ - /* This file is part of Ingen. * Copyright (C) 2007 Dave Robillard <http://drobilla.net> * @@ -44,7 +43,7 @@ public: private: SharedPtr<Shared::ClientInterface> _client; - int32_t _id; + int32_t _id; }; diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp index dd52d2b2..45f8616d 100644 --- a/src/libs/engine/JackAudioDriver.cpp +++ b/src/libs/engine/JackAudioDriver.cpp @@ -280,6 +280,9 @@ JackAudioDriver::create_port(DuplexPort* patch_port) int JackAudioDriver::_process_cb(jack_nframes_t nframes) { + if (nframes == 0) + return 0; + // FIXME: all of this time stuff is screwy static jack_nframes_t start_of_current_cycle = 0; diff --git a/src/libs/engine/QueuedEventSource.cpp b/src/libs/engine/QueuedEventSource.cpp index f19199ff..885e475f 100644 --- a/src/libs/engine/QueuedEventSource.cpp +++ b/src/libs/engine/QueuedEventSource.cpp @@ -41,6 +41,9 @@ QueuedEventSource::QueuedEventSource(size_t queued_size, size_t stamped_size) Thread::set_context(THREAD_PRE_PROCESS); assert(context() == THREAD_PRE_PROCESS); + + set_name("QueuedEventSource"); + Thread::start(); } @@ -106,6 +109,8 @@ QueuedEventSource::process(PostProcessor& dest, SampleCount nframes, FrameTime c if (num_events_processed > 0) dest.whip(); + //else + // cerr << "NO PROC: queued: " << unprepared_events() << ", stamped: " << !_stamped_queue.empty() << endl; } diff --git a/src/libs/engine/engine.cpp b/src/libs/engine/engine.cpp index bb482e47..d07efda8 100644 --- a/src/libs/engine/engine.cpp +++ b/src/libs/engine/engine.cpp @@ -24,18 +24,6 @@ namespace Ingen { -/* -void -catch_int(int) -{ - signal(SIGINT, catch_int); - signal(SIGTERM, catch_int); - - std::cout << "[Main] Ingen interrupted." << std::endl; - engine->quit(); -} -*/ - Engine* new_engine() { @@ -62,27 +50,5 @@ launch_osc_engine(int port) } } -/* -void -run(int port) -{ - signal(SIGINT, catch_int); - signal(SIGTERM, catch_int); - - set_denormal_flags(); - - Engine* engine = new_engine(); - - engine->start_jack_driver(); - engine->start_osc_driver(port); - - engine->activate(); - - engine->main(); - - delete engine; -} -*/ - } // namespace Ingen diff --git a/src/libs/engine/engine.h b/src/libs/engine/engine.h index 588ab047..04bf7b1f 100644 --- a/src/libs/engine/engine.h +++ b/src/libs/engine/engine.h @@ -18,6 +18,8 @@ #ifndef INGEN_ENGINE_H #define INGEN_ENGINE_H +#include <raul/SharedPtr.h> + namespace Ingen { class Engine; @@ -30,12 +32,11 @@ extern "C" { /** Create a new engine in this process */ Engine* new_engine(); - + /** Launch an OSC engine as a completely separate process * \return true if successful */ bool launch_osc_engine(int port); - } diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp index 40468a74..0bc24452 100644 --- a/src/libs/gui/ConnectWindow.cpp +++ b/src/libs/gui/ConnectWindow.cpp @@ -127,9 +127,6 @@ ConnectWindow::start(SharedPtr<Ingen::Engine> engine, SharedPtr<Shared::EngineIn _connect_stage = 0; Glib::signal_timeout().connect( - sigc::mem_fun(engine.get(), &Ingen::Engine::main_iteration), 1000); - - Glib::signal_timeout().connect( sigc::mem_fun(tsci, &ThreadedSigClientInterface::emit_signals), 2, G_PRIORITY_HIGH_IDLE); } 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(); |