summaryrefslogtreecommitdiffstats
path: root/src/engine/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-16 05:05:32 +0000
committerDavid Robillard <d@drobilla.net>2011-04-16 05:05:32 +0000
commit987710474b824cb92d83ff6fa7a090f50e10756f (patch)
treef9d9ac7d52f046e284e03f9ab2de70b1ab76b97e /src/engine/JackDriver.cpp
parent2b04af0ab5d18d3116290fab7febac86f41068c9 (diff)
downloadingen-987710474b824cb92d83ff6fa7a090f50e10756f.tar.gz
ingen-987710474b824cb92d83ff6fa7a090f50e10756f.tar.bz2
ingen-987710474b824cb92d83ff6fa7a090f50e10756f.zip
Hide process slave stuff from Engine.hpp.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3151 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/JackDriver.cpp')
-rw-r--r--src/engine/JackDriver.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp
index c807c098..e3c89ca6 100644
--- a/src/engine/JackDriver.cpp
+++ b/src/engine/JackDriver.cpp
@@ -291,19 +291,24 @@ JackDriver::attach(const std::string& server_name,
void
JackDriver::activate()
{
+ Shared::World* world = _engine.world();
+
if (_is_activated) {
LOG(warn) << "Jack driver already activated." << endl;
return;
}
if (!_client)
- attach(_engine.world()->conf()->option("jack-server").get_string(),
- _engine.world()->conf()->option("jack-client").get_string(), NULL);
+ attach(world->conf()->option("jack-server").get_string(),
+ world->conf()->option("jack-client").get_string(), NULL);
jack_set_process_callback(_client, process_cb, this);
_is_activated = true;
+ _process_context.activate(world->conf()->option("parallelism").get_int32(),
+ is_realtime());
+
if (jack_activate(_client)) {
LOG(error) << "Could not activate Jack client, aborting." << endl;
exit(EXIT_FAILURE);
@@ -446,8 +451,8 @@ JackDriver::_process_cb(jack_nframes_t nframes)
_process_context.locate(start_of_current_cycle, nframes, 0);
- for (Engine::ProcessSlaves::iterator i = _engine.process_slaves().begin();
- i != _engine.process_slaves().end(); ++i) {
+ for (ProcessContext::Slaves::iterator i = _process_context.slaves().begin();
+ i != _process_context.slaves().end(); ++i) {
(*i)->context().locate(start_of_current_cycle, nframes, 0);
}