summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-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
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);
-
}