summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-06-24 17:05:42 +0000
committerDavid Robillard <d@drobilla.net>2007-06-24 17:05:42 +0000
commit06548d893646764cbda3bef2f440b953b1716ae5 (patch)
tree2092373f6c9fe9e07afc77cfdd3b00180d7614c3 /src/libs
parent433b5c46520b16882cb2a79f9d44840037ec914d (diff)
downloadingen-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')
-rw-r--r--src/libs/engine/DirectResponder.h3
-rw-r--r--src/libs/engine/JackAudioDriver.cpp3
-rw-r--r--src/libs/engine/QueuedEventSource.cpp5
-rw-r--r--src/libs/engine/engine.cpp34
-rw-r--r--src/libs/engine/engine.h5
-rw-r--r--src/libs/gui/ConnectWindow.cpp3
6 files changed, 12 insertions, 41 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);
}