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/libs/engine | |
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/libs/engine')
-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 |
5 files changed, 12 insertions, 38 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); - } |