summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/QueuedEngineInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/QueuedEngineInterface.cpp')
-rw-r--r--src/libs/engine/QueuedEngineInterface.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp
index 681cf798..b38692ea 100644
--- a/src/libs/engine/QueuedEngineInterface.cpp
+++ b/src/libs/engine/QueuedEngineInterface.cpp
@@ -24,7 +24,7 @@
namespace Ingen {
-QueuedEngineInterface::QueuedEngineInterface(SharedPtr<Engine> engine, size_t queued_size, size_t stamped_size)
+QueuedEngineInterface::QueuedEngineInterface(Engine& engine, size_t queued_size, size_t stamped_size)
: QueuedEventSource(queued_size, stamped_size)
, _responder(SharedPtr<Responder>(new Responder())) // NULL responder
, _engine(engine)
@@ -37,7 +37,7 @@ QueuedEngineInterface::now() const
{
// Exactly one cycle latency (some could run ASAP if we get lucky, but not always, and a slight
// constant latency is far better than jittery lower (average) latency
- return _engine->audio_driver()->frame_time() + _engine->audio_driver()->buffer_size();
+ return _engine.audio_driver()->frame_time() + _engine.audio_driver()->buffer_size();
}
@@ -76,14 +76,14 @@ QueuedEngineInterface::disable_responses()
void
QueuedEngineInterface::register_client(ClientKey key, SharedPtr<ClientInterface> client)
{
- push_queued(new RegisterClientEvent(*_engine.get(), _responder, now(), key, client));
+ push_queued(new RegisterClientEvent(_engine, _responder, now(), key, client));
}
void
QueuedEngineInterface::unregister_client(ClientKey key)
{
- push_queued(new UnregisterClientEvent(*_engine.get(), _responder, now(), key));
+ push_queued(new UnregisterClientEvent(_engine, _responder, now(), key));
}
@@ -92,7 +92,7 @@ QueuedEngineInterface::unregister_client(ClientKey key)
void
QueuedEngineInterface::load_plugins()
{
- push_queued(new LoadPluginsEvent(*_engine.get(), _responder, now()));
+ push_queued(new LoadPluginsEvent(_engine, _responder, now()));
}
@@ -100,14 +100,14 @@ QueuedEngineInterface::load_plugins()
void
QueuedEngineInterface::activate()
{
- push_queued(new PingQueuedEvent(*_engine.get(), _responder, now()));
+ push_queued(new PingQueuedEvent(_engine, _responder, now()));
}
void
QueuedEngineInterface::deactivate()
{
- push_queued(new DeactivateEvent(*_engine.get(), _responder, now()));
+ push_queued(new DeactivateEvent(_engine, _responder, now()));
}
@@ -115,7 +115,7 @@ void
QueuedEngineInterface::quit()
{
_responder->respond_ok();
- _engine->quit();
+ _engine.quit();
}
@@ -126,7 +126,7 @@ void
QueuedEngineInterface::create_patch(const string& path,
uint32_t poly)
{
- push_queued(new CreatePatchEvent(*_engine.get(), _responder, now(), path, poly));
+ push_queued(new CreatePatchEvent(_engine, _responder, now(), path, poly));
}
@@ -135,7 +135,7 @@ void QueuedEngineInterface::create_port(const string& path,
const string& data_type,
bool direction)
{
- push_queued(new AddPortEvent(*_engine.get(), _responder, now(), path, data_type, direction, this));
+ push_queued(new AddPortEvent(_engine, _responder, now(), path, data_type, direction, this));
}
@@ -144,7 +144,7 @@ QueuedEngineInterface::create_node(const string& path,
const string& plugin_uri,
bool polyphonic)
{
- push_queued(new AddNodeEvent(*_engine.get(), _responder, now(),
+ push_queued(new AddNodeEvent(_engine, _responder, now(),
path, plugin_uri, polyphonic));
}
@@ -156,7 +156,7 @@ QueuedEngineInterface::create_node(const string& path,
const string& plugin_label,
bool polyphonic)
{
- push_queued(new AddNodeEvent(*_engine.get(), _responder, now(),
+ push_queued(new AddNodeEvent(_engine, _responder, now(),
path, plugin_type, plugin_lib, plugin_label, polyphonic));
}
@@ -164,35 +164,35 @@ void
QueuedEngineInterface::rename(const string& old_path,
const string& new_name)
{
- push_queued(new RenameEvent(*_engine.get(), _responder, now(), old_path, new_name));
+ push_queued(new RenameEvent(_engine, _responder, now(), old_path, new_name));
}
void
QueuedEngineInterface::destroy(const string& path)
{
- push_queued(new DestroyEvent(*_engine.get(), _responder, now(), this, path));
+ push_queued(new DestroyEvent(_engine, _responder, now(), this, path));
}
void
QueuedEngineInterface::clear_patch(const string& patch_path)
{
- push_queued(new ClearPatchEvent(*_engine.get(), _responder, now(), this, patch_path));
+ push_queued(new ClearPatchEvent(_engine, _responder, now(), this, patch_path));
}
void
QueuedEngineInterface::enable_patch(const string& patch_path)
{
- push_queued(new EnablePatchEvent(*_engine.get(), _responder, now(), patch_path));
+ push_queued(new EnablePatchEvent(_engine, _responder, now(), patch_path));
}
void
QueuedEngineInterface::disable_patch(const string& patch_path)
{
- push_queued(new DisablePatchEvent(*_engine.get(), _responder, now(), patch_path));
+ push_queued(new DisablePatchEvent(_engine, _responder, now(), patch_path));
}
@@ -200,7 +200,7 @@ void
QueuedEngineInterface::connect(const string& src_port_path,
const string& dst_port_path)
{
- push_queued(new ConnectionEvent(*_engine.get(), _responder, now(), src_port_path, dst_port_path));
+ push_queued(new ConnectionEvent(_engine, _responder, now(), src_port_path, dst_port_path));
}
@@ -209,14 +209,14 @@ void
QueuedEngineInterface::disconnect(const string& src_port_path,
const string& dst_port_path)
{
- push_queued(new DisconnectionEvent(*_engine.get(), _responder, now(), src_port_path, dst_port_path));
+ push_queued(new DisconnectionEvent(_engine, _responder, now(), src_port_path, dst_port_path));
}
void
QueuedEngineInterface::disconnect_all(const string& node_path)
{
- push_queued(new DisconnectNodeEvent(*_engine.get(), _responder, now(), node_path));
+ push_queued(new DisconnectNodeEvent(_engine, _responder, now(), node_path));
}
@@ -224,7 +224,7 @@ void
QueuedEngineInterface::set_port_value(const string& port_path,
float value)
{
- push_stamped(new SetPortValueEvent(*_engine.get(), _responder, now(), port_path, value));
+ push_stamped(new SetPortValueEvent(_engine, _responder, now(), port_path, value));
}
@@ -233,7 +233,7 @@ QueuedEngineInterface::set_port_value(const string& port_path,
uint32_t voice,
float value)
{
- push_stamped(new SetPortValueEvent(*_engine.get(), _responder, now(), voice, port_path, value));
+ push_stamped(new SetPortValueEvent(_engine, _responder, now(), voice, port_path, value));
}
@@ -241,7 +241,7 @@ void
QueuedEngineInterface::set_port_value_queued(const string& port_path,
float value)
{
- push_queued(new SetPortValueQueuedEvent(*_engine.get(), _responder, now(), port_path, value));
+ push_queued(new SetPortValueQueuedEvent(_engine, _responder, now(), port_path, value));
}
@@ -251,7 +251,7 @@ QueuedEngineInterface::set_program(const string& node_path,
uint32_t program)
{
#ifdef HAVE_DSSI
- push_queued(new DSSIProgramEvent(*_engine.get(), _responder, now(), node_path, bank, program));
+ push_queued(new DSSIProgramEvent(_engine, _responder, now(), node_path, bank, program));
#endif
}
@@ -259,7 +259,7 @@ QueuedEngineInterface::set_program(const string& node_path,
void
QueuedEngineInterface::midi_learn(const string& node_path)
{
- push_queued(new MidiLearnEvent(*_engine.get(), _responder, now(), node_path));
+ push_queued(new MidiLearnEvent(_engine, _responder, now(), node_path));
}
@@ -268,7 +268,7 @@ QueuedEngineInterface::set_metadata(const string& path,
const string& predicate,
const Atom& value)
{
- push_queued(new SetMetadataEvent(*_engine.get(), _responder, now(), path, predicate, value));
+ push_queued(new SetMetadataEvent(_engine, _responder, now(), path, predicate, value));
}
@@ -277,8 +277,8 @@ QueuedEngineInterface::set_metadata(const string& path,
void
QueuedEngineInterface::ping()
{
- if (_engine->activated()) {
- push_queued(new PingQueuedEvent(*_engine.get(), _responder, now()));
+ if (_engine.activated()) {
+ push_queued(new PingQueuedEvent(_engine, _responder, now()));
} else if (_responder) {
_responder->respond_ok();
}
@@ -288,35 +288,35 @@ QueuedEngineInterface::ping()
void
QueuedEngineInterface::request_plugin(const string& uri)
{
- push_queued(new RequestPluginEvent(*_engine.get(), _responder, now(), uri));
+ push_queued(new RequestPluginEvent(_engine, _responder, now(), uri));
}
void
QueuedEngineInterface::request_object(const string& path)
{
- push_queued(new RequestObjectEvent(*_engine.get(), _responder, now(), path));
+ push_queued(new RequestObjectEvent(_engine, _responder, now(), path));
}
void
QueuedEngineInterface::request_port_value(const string& port_path)
{
- push_queued(new RequestPortValueEvent(*_engine.get(), _responder, now(), port_path));
+ push_queued(new RequestPortValueEvent(_engine, _responder, now(), port_path));
}
void
QueuedEngineInterface::request_plugins()
{
- push_queued(new RequestPluginsEvent(*_engine.get(), _responder, now()));
+ push_queued(new RequestPluginsEvent(_engine, _responder, now()));
}
void
QueuedEngineInterface::request_all_objects()
{
- push_queued(new RequestAllObjectsEvent(*_engine.get(), _responder, now()));
+ push_queued(new RequestAllObjectsEvent(_engine, _responder, now()));
}