summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/ActivateEvent.cpp13
-rw-r--r--src/libs/engine/events/ActivateEvent.h2
-rw-r--r--src/libs/engine/events/AddNodeEvent.cpp23
-rw-r--r--src/libs/engine/events/AddNodeEvent.h4
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp25
-rw-r--r--src/libs/engine/events/AddPortEvent.h4
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.cpp11
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.h6
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp13
-rw-r--r--src/libs/engine/events/ClearPatchEvent.h4
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp25
-rw-r--r--src/libs/engine/events/ConnectionEvent.h8
-rw-r--r--src/libs/engine/events/CreatePatchEvent.cpp21
-rw-r--r--src/libs/engine/events/CreatePatchEvent.h4
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.cpp11
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.h4
-rw-r--r--src/libs/engine/events/DSSIControlEvent.cpp9
-rw-r--r--src/libs/engine/events/DSSIControlEvent.h4
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.cpp11
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.h4
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.cpp9
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.h4
-rw-r--r--src/libs/engine/events/DeactivateEvent.cpp9
-rw-r--r--src/libs/engine/events/DeactivateEvent.h4
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp19
-rw-r--r--src/libs/engine/events/DestroyEvent.h6
-rw-r--r--src/libs/engine/events/DisablePatchEvent.cpp11
-rw-r--r--src/libs/engine/events/DisablePatchEvent.h4
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.cpp11
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.h4
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.cpp11
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.h4
-rw-r--r--src/libs/engine/events/DisconnectionEvent.cpp33
-rw-r--r--src/libs/engine/events/DisconnectionEvent.h10
-rw-r--r--src/libs/engine/events/EnablePatchEvent.cpp11
-rw-r--r--src/libs/engine/events/EnablePatchEvent.h4
-rw-r--r--src/libs/engine/events/LashRestoreDoneEvent.h2
-rw-r--r--src/libs/engine/events/LoadPluginsEvent.cpp7
-rw-r--r--src/libs/engine/events/LoadPluginsEvent.h2
-rw-r--r--src/libs/engine/events/MidiLearnEvent.cpp11
-rw-r--r--src/libs/engine/events/MidiLearnEvent.h10
-rw-r--r--src/libs/engine/events/NoteOffEvent.cpp11
-rw-r--r--src/libs/engine/events/NoteOffEvent.h6
-rw-r--r--src/libs/engine/events/NoteOnEvent.cpp11
-rw-r--r--src/libs/engine/events/NoteOnEvent.h6
-rw-r--r--src/libs/engine/events/PingQueuedEvent.h2
-rw-r--r--src/libs/engine/events/RegisterClientEvent.cpp7
-rw-r--r--src/libs/engine/events/RegisterClientEvent.h2
-rw-r--r--src/libs/engine/events/RenameEvent.cpp13
-rw-r--r--src/libs/engine/events/RenameEvent.h4
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.cpp5
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.h2
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.cpp7
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.h2
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.cpp7
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.h2
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.cpp11
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.h6
-rw-r--r--src/libs/engine/events/SetMetadataEvent.cpp11
-rw-r--r--src/libs/engine/events/SetMetadataEvent.h4
-rw-r--r--src/libs/engine/events/SetPortValueEvent.cpp21
-rw-r--r--src/libs/engine/events/SetPortValueEvent.h6
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.cpp19
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.h6
-rw-r--r--src/libs/engine/events/UnregisterClientEvent.cpp7
-rw-r--r--src/libs/engine/events/UnregisterClientEvent.h2
66 files changed, 268 insertions, 304 deletions
diff --git a/src/libs/engine/events/ActivateEvent.cpp b/src/libs/engine/events/ActivateEvent.cpp
index b558b83a..27875c59 100644
--- a/src/libs/engine/events/ActivateEvent.cpp
+++ b/src/libs/engine/events/ActivateEvent.cpp
@@ -16,13 +16,12 @@
#include "ActivateEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
namespace Om {
-ActivateEvent::ActivateEvent(CountedPtr<Responder> responder, samplecount timestamp)
+ActivateEvent::ActivateEvent(CountedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(responder, timestamp)
{
}
@@ -33,18 +32,14 @@ ActivateEvent::pre_process()
{
QueuedEvent::pre_process();
- if (om != NULL)
- om->activate();
+ Ingen::instance().activate();
}
void
ActivateEvent::post_process()
{
- if (om != NULL)
- _responder->respond_ok();
- else
- _responder->respond_error("Not ready to activate yet.");
+ _responder->respond_ok();
}
diff --git a/src/libs/engine/events/ActivateEvent.h b/src/libs/engine/events/ActivateEvent.h
index d9c8eae9..cb961eab 100644
--- a/src/libs/engine/events/ActivateEvent.h
+++ b/src/libs/engine/events/ActivateEvent.h
@@ -29,7 +29,7 @@ namespace Om {
class ActivateEvent : public QueuedEvent
{
public:
- ActivateEvent(CountedPtr<Responder> responder, samplecount timestamp);
+ ActivateEvent(CountedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
void post_process();
diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp
index 29d98360..1dc30263 100644
--- a/src/libs/engine/events/AddNodeEvent.cpp
+++ b/src/libs/engine/events/AddNodeEvent.cpp
@@ -20,8 +20,7 @@
#include "Node.h"
#include "Tree.h"
#include "Plugin.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Patch.h"
#include "NodeFactory.h"
#include "ClientBroadcaster.h"
@@ -34,7 +33,7 @@
namespace Om {
-AddNodeEvent::AddNodeEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, Plugin* plugin, bool poly)
+AddNodeEvent::AddNodeEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, Plugin* plugin, bool poly)
: QueuedEvent(responder, timestamp),
m_path(path),
m_plugin(plugin),
@@ -56,19 +55,19 @@ AddNodeEvent::~AddNodeEvent()
void
AddNodeEvent::pre_process()
{
- if (om->object_store()->find(m_path) != NULL) {
+ if (Ingen::instance().object_store()->find(m_path) != NULL) {
m_node_already_exists = true;
QueuedEvent::pre_process();
return;
}
- m_patch = om->object_store()->find_patch(m_path.parent());
+ m_patch = Ingen::instance().object_store()->find_patch(m_path.parent());
if (m_patch != NULL) {
if (m_poly)
- m_node = om->node_factory()->load_plugin(m_plugin, m_path.name(), m_patch->internal_poly(), m_patch);
+ m_node = Ingen::instance().node_factory()->load_plugin(m_plugin, m_path.name(), m_patch->internal_poly(), m_patch);
else
- m_node = om->node_factory()->load_plugin(m_plugin, m_path.name(), 1, m_patch);
+ m_node = Ingen::instance().node_factory()->load_plugin(m_plugin, m_path.name(), 1, m_patch);
if (m_node != NULL) {
m_node->activate();
@@ -77,7 +76,7 @@ AddNodeEvent::pre_process()
// node tree - just the process order array
m_patch->add_node(new ListNode<Node*>(m_node));
m_node->add_to_store();
-
+
if (m_patch->process())
m_process_order = m_patch->build_process_order();
}
@@ -87,7 +86,7 @@ AddNodeEvent::pre_process()
void
-AddNodeEvent::execute(samplecount offset)
+AddNodeEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
@@ -95,7 +94,7 @@ AddNodeEvent::execute(samplecount offset)
m_node->add_to_patch();
if (m_patch->process_order() != NULL)
- om->maid()->push(m_patch->process_order());
+ Ingen::instance().maid()->push(m_patch->process_order());
m_patch->process_order(m_process_order);
}
}
@@ -118,8 +117,8 @@ AddNodeEvent::post_process()
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- //om->client_broadcaster()->send_node_creation_messages(m_node);
- om->client_broadcaster()->send_node(m_node);
+ //Ingen::instance().client_broadcaster()->send_node_creation_messages(m_node);
+ Ingen::instance().client_broadcaster()->send_node(m_node);
}
}
diff --git a/src/libs/engine/events/AddNodeEvent.h b/src/libs/engine/events/AddNodeEvent.h
index 3fc204f9..99f89fe0 100644
--- a/src/libs/engine/events/AddNodeEvent.h
+++ b/src/libs/engine/events/AddNodeEvent.h
@@ -39,11 +39,11 @@ class Plugin;
class AddNodeEvent : public QueuedEvent
{
public:
- AddNodeEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, Plugin* plugin, bool poly);
+ AddNodeEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, Plugin* plugin, bool poly);
~AddNodeEvent();
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp
index c8360996..01937259 100644
--- a/src/libs/engine/events/AddPortEvent.cpp
+++ b/src/libs/engine/events/AddPortEvent.cpp
@@ -19,8 +19,7 @@
#include "Patch.h"
#include "Tree.h"
#include "Plugin.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Patch.h"
#include "Maid.h"
#include "util/Path.h"
@@ -37,7 +36,7 @@
namespace Om {
-AddPortEvent::AddPortEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& type, bool is_output)
+AddPortEvent::AddPortEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output)
: QueuedEvent(responder, timestamp),
_path(path),
_type(type),
@@ -58,21 +57,21 @@ AddPortEvent::AddPortEvent(CountedPtr<Responder> responder, samplecount timestam
void
AddPortEvent::pre_process()
{
- if (om->object_store()->find(_path) != NULL) {
+ if (Ingen::instance().object_store()->find(_path) != NULL) {
QueuedEvent::pre_process();
return;
}
// FIXME: this is just a mess :/
- _patch = om->object_store()->find_patch(_path.parent());
+ _patch = Ingen::instance().object_store()->find_patch(_path.parent());
if (_patch != NULL) {
assert(_patch->path() == _path.parent());
size_t buffer_size = 1;
if (_type == "AUDIO" || _type == "MIDI")
- buffer_size = om->audio_driver()->buffer_size();
+ buffer_size = Ingen::instance().audio_driver()->buffer_size();
_patch_port = _patch->create_port(_path.name(), _data_type, buffer_size, _is_output);
if (_patch_port) {
@@ -87,14 +86,14 @@ AddPortEvent::pre_process()
_ports_array = new Array<Port*>(_patch->num_ports() + 1, NULL);
_ports_array->at(_patch->num_ports()) = _patch_port;
- om->object_store()->add(_patch_port);
+ Ingen::instance().object_store()->add(_patch_port);
if (!_patch->parent()) {
if (_type == "AUDIO")
- _driver_port = om->audio_driver()->create_port(
- dynamic_cast<DuplexPort<sample>*>(_patch_port));
+ _driver_port = Ingen::instance().audio_driver()->create_port(
+ dynamic_cast<DuplexPort<Sample>*>(_patch_port));
else if (_type == "MIDI")
- _driver_port = om->midi_driver()->create_port(
+ _driver_port = Ingen::instance().midi_driver()->create_port(
dynamic_cast<DuplexPort<MidiMessage>*>(_patch_port));
}
}
@@ -104,12 +103,12 @@ AddPortEvent::pre_process()
void
-AddPortEvent::execute(samplecount offset)
+AddPortEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
if (_patch_port) {
- om->maid()->push(_patch->external_ports());
+ Ingen::instance().maid()->push(_patch->external_ports());
//_patch->add_port(_port);
_patch->external_ports(_ports_array);
}
@@ -127,7 +126,7 @@ AddPortEvent::post_process()
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- om->client_broadcaster()->send_port(_patch_port);
+ Ingen::instance().client_broadcaster()->send_port(_patch_port);
}
}
diff --git a/src/libs/engine/events/AddPortEvent.h b/src/libs/engine/events/AddPortEvent.h
index ba3f860a..e8599348 100644
--- a/src/libs/engine/events/AddPortEvent.h
+++ b/src/libs/engine/events/AddPortEvent.h
@@ -41,10 +41,10 @@ class DriverPort;
class AddPortEvent : public QueuedEvent
{
public:
- AddPortEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& type, bool is_output);
+ AddPortEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp
index e7be3e0b..01d5b448 100644
--- a/src/libs/engine/events/AllNotesOffEvent.cpp
+++ b/src/libs/engine/events/AllNotesOffEvent.cpp
@@ -16,8 +16,7 @@
#include "AllNotesOffEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ObjectStore.h"
namespace Om {
@@ -25,7 +24,7 @@ namespace Om {
/** Note off with patch explicitly passed - triggered by MIDI.
*/
-AllNotesOffEvent::AllNotesOffEvent(CountedPtr<Responder> responder, samplecount timestamp, Patch* patch)
+AllNotesOffEvent::AllNotesOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, Patch* patch)
: Event(responder, timestamp),
m_patch(patch)
{
@@ -34,7 +33,7 @@ AllNotesOffEvent::AllNotesOffEvent(CountedPtr<Responder> responder, samplecount
/** Note off event with lookup - triggered by OSC.
*/
-AllNotesOffEvent::AllNotesOffEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path)
+AllNotesOffEvent::AllNotesOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: Event(responder, timestamp),
m_patch(NULL),
m_patch_path(patch_path)
@@ -43,10 +42,10 @@ AllNotesOffEvent::AllNotesOffEvent(CountedPtr<Responder> responder, samplecount
void
-AllNotesOffEvent::execute(samplecount offset)
+AllNotesOffEvent::execute(SampleCount offset)
{
if (m_patch == NULL && m_patch_path != "")
- m_patch = om->object_store()->find_patch(m_patch_path);
+ m_patch = Ingen::instance().object_store()->find_patch(m_patch_path);
//if (m_patch != NULL)
// for (List<MidiInNode*>::iterator j = m_patch->midi_in_nodes().begin(); j != m_patch->midi_in_nodes().end(); ++j)
diff --git a/src/libs/engine/events/AllNotesOffEvent.h b/src/libs/engine/events/AllNotesOffEvent.h
index fbdd8e14..a994daae 100644
--- a/src/libs/engine/events/AllNotesOffEvent.h
+++ b/src/libs/engine/events/AllNotesOffEvent.h
@@ -33,10 +33,10 @@ class Patch;
class AllNotesOffEvent : public Event
{
public:
- AllNotesOffEvent(CountedPtr<Responder> responder, samplecount timestamp, Patch* patch);
- AllNotesOffEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path);
+ AllNotesOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, Patch* patch);
+ AllNotesOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index e95880c3..fc045633 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -16,8 +16,7 @@
#include "ClearPatchEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Patch.h"
#include "ClientBroadcaster.h"
#include "util.h"
@@ -31,7 +30,7 @@
namespace Om {
-ClearPatchEvent::ClearPatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path)
+ClearPatchEvent::ClearPatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(responder, true),
m_patch_path(patch_path),
m_patch(NULL),
@@ -43,7 +42,7 @@ ClearPatchEvent::ClearPatchEvent(CountedPtr<Responder> responder, samplecount ti
void
ClearPatchEvent::pre_process()
{
- m_patch = om->object_store()->find_patch(m_patch_path);
+ m_patch = Ingen::instance().object_store()->find_patch(m_patch_path);
if (m_patch != NULL) {
@@ -58,7 +57,7 @@ ClearPatchEvent::pre_process()
void
-ClearPatchEvent::execute(samplecount offset)
+ClearPatchEvent::execute(SampleCount offset)
{
if (m_patch != NULL) {
m_patch->process(false);
@@ -67,7 +66,7 @@ ClearPatchEvent::execute(samplecount offset)
(*i)->remove_from_patch();
if (m_patch->process_order() != NULL) {
- om->maid()->push(m_patch->process_order());
+ Ingen::instance().maid()->push(m_patch->process_order());
m_patch->process_order(NULL);
}
}
@@ -101,7 +100,7 @@ ClearPatchEvent::post_process()
// Reply
_responder->respond_ok();
- om->client_broadcaster()->send_patch_cleared(m_patch_path);
+ Ingen::instance().client_broadcaster()->send_patch_cleared(m_patch_path);
} else {
_responder->respond_error(string("Patch ") + m_patch_path + " not found");
}
diff --git a/src/libs/engine/events/ClearPatchEvent.h b/src/libs/engine/events/ClearPatchEvent.h
index 3106abdf..1a2fe14b 100644
--- a/src/libs/engine/events/ClearPatchEvent.h
+++ b/src/libs/engine/events/ClearPatchEvent.h
@@ -35,10 +35,10 @@ class Patch;
class ClearPatchEvent : public QueuedEvent
{
public:
- ClearPatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path);
+ ClearPatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index d229ab7c..15b79b46 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -18,8 +18,7 @@
#include <string>
#include "Responder.h"
#include "types.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "TypedConnection.h"
#include "InputPort.h"
#include "OutputPort.h"
@@ -37,7 +36,7 @@ namespace Om {
//// ConnectionEvent ////
-ConnectionEvent::ConnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& src_port_path, const string& dst_port_path)
+ConnectionEvent::ConnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(responder, timestamp),
m_src_port_path(src_port_path),
m_dst_port_path(dst_port_path),
@@ -67,7 +66,7 @@ ConnectionEvent::pre_process()
return;
}
- /*m_patch = om->object_store()->find_patch(m_src_port_path.parent().parent());
+ /*m_patch = Ingen::instance().object_store()->find_patch(m_src_port_path.parent().parent());
if (m_patch == NULL) {
m_error = PORT_NOT_FOUND;
@@ -75,8 +74,8 @@ ConnectionEvent::pre_process()
return;
}*/
- m_src_port = om->object_store()->find_port(m_src_port_path);
- m_dst_port = om->object_store()->find_port(m_dst_port_path);
+ m_src_port = Ingen::instance().object_store()->find_port(m_src_port_path);
+ m_dst_port = Ingen::instance().object_store()->find_port(m_dst_port_path);
if (m_src_port == NULL || m_dst_port == NULL) {
m_error = PORT_NOT_FOUND;
@@ -105,8 +104,8 @@ ConnectionEvent::pre_process()
// Create the typed event to actually do the work
const DataType type = m_src_port->type();
if (type == DataType::FLOAT) {
- m_typed_event = new TypedConnectionEvent<sample>(_responder, _time_stamp,
- dynamic_cast<OutputPort<sample>*>(m_src_port), dynamic_cast<InputPort<sample>*>(m_dst_port));
+ m_typed_event = new TypedConnectionEvent<Sample>(_responder, _time_stamp,
+ dynamic_cast<OutputPort<Sample>*>(m_src_port), dynamic_cast<InputPort<Sample>*>(m_dst_port));
} else if (type == DataType::MIDI) {
m_typed_event = new TypedConnectionEvent<MidiMessage>(_responder, _time_stamp,
dynamic_cast<OutputPort<MidiMessage>*>(m_src_port), dynamic_cast<InputPort<MidiMessage>*>(m_dst_port));
@@ -123,7 +122,7 @@ ConnectionEvent::pre_process()
void
-ConnectionEvent::execute(samplecount offset)
+ConnectionEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
@@ -151,7 +150,7 @@ ConnectionEvent::post_process()
template <typename T>
-TypedConnectionEvent<T>::TypedConnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
+TypedConnectionEvent<T>::TypedConnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(responder, timestamp),
m_src_port(src_port),
m_dst_port(dst_port),
@@ -229,14 +228,14 @@ TypedConnectionEvent<T>::pre_process()
template <typename T>
void
-TypedConnectionEvent<T>::execute(samplecount offset)
+TypedConnectionEvent<T>::execute(SampleCount offset)
{
if (m_succeeded) {
// These must be inserted here, since they're actually used by the audio thread
m_dst_port->add_connection(m_port_listnode);
m_patch->add_connection(m_patch_listnode);
if (m_patch->process_order() != NULL)
- om->maid()->push(m_patch->process_order());
+ Ingen::instance().maid()->push(m_patch->process_order());
m_patch->process_order(m_process_order);
}
}
@@ -251,7 +250,7 @@ TypedConnectionEvent<T>::post_process()
_responder->respond_ok();
- om->client_broadcaster()->send_connection(m_connection);
+ Ingen::instance().client_broadcaster()->send_connection(m_connection);
} else {
_responder->respond_error("Unable to make connection.");
}
diff --git a/src/libs/engine/events/ConnectionEvent.h b/src/libs/engine/events/ConnectionEvent.h
index 6a95817a..b617b158 100644
--- a/src/libs/engine/events/ConnectionEvent.h
+++ b/src/libs/engine/events/ConnectionEvent.h
@@ -46,11 +46,11 @@ template <typename T> class TypedConnectionEvent; // helper, defined below
class ConnectionEvent : public QueuedEvent
{
public:
- ConnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& src_port_path, const string& dst_port_path);
+ ConnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path);
~ConnectionEvent();
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
@@ -80,10 +80,10 @@ template <typename T>
class TypedConnectionEvent : public QueuedEvent
{
public:
- TypedConnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port);
+ TypedConnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp
index 7fe72471..65daf327 100644
--- a/src/libs/engine/events/CreatePatchEvent.cpp
+++ b/src/libs/engine/events/CreatePatchEvent.cpp
@@ -20,8 +20,7 @@
#include "Node.h"
#include "Tree.h"
#include "Plugin.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Maid.h"
#include "ClientBroadcaster.h"
#include "AudioDriver.h"
@@ -31,7 +30,7 @@
namespace Om {
-CreatePatchEvent::CreatePatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, int poly)
+CreatePatchEvent::CreatePatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly)
: QueuedEvent(responder, timestamp),
m_path(path),
m_patch(NULL),
@@ -46,7 +45,7 @@ CreatePatchEvent::CreatePatchEvent(CountedPtr<Responder> responder, samplecount
void
CreatePatchEvent::pre_process()
{
- if (om->object_store()->find(m_path) != NULL) {
+ if (Ingen::instance().object_store()->find(m_path) != NULL) {
m_error = OBJECT_EXISTS;
QueuedEvent::pre_process();
return;
@@ -59,7 +58,7 @@ CreatePatchEvent::pre_process()
}
if (m_path != "/") {
- m_parent = om->object_store()->find_patch(m_path.parent());
+ m_parent = Ingen::instance().object_store()->find_patch(m_path.parent());
if (m_parent == NULL) {
m_error = PARENT_NOT_FOUND;
QueuedEvent::pre_process();
@@ -71,7 +70,7 @@ CreatePatchEvent::pre_process()
if (m_parent != NULL && m_poly > 1 && m_poly == static_cast<int>(m_parent->internal_poly()))
poly = m_poly;
- m_patch = new Patch(m_path.name(), poly, m_parent, om->audio_driver()->sample_rate(), om->audio_driver()->buffer_size(), m_poly);
+ m_patch = new Patch(m_path.name(), poly, m_parent, Ingen::instance().audio_driver()->sample_rate(), Ingen::instance().audio_driver()->buffer_size(), m_poly);
if (m_parent != NULL) {
m_parent->add_node(new ListNode<Node*>(m_patch));
@@ -90,7 +89,7 @@ CreatePatchEvent::pre_process()
void
-CreatePatchEvent::execute(samplecount offset)
+CreatePatchEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
@@ -98,7 +97,7 @@ CreatePatchEvent::execute(samplecount offset)
if (m_parent == NULL) {
assert(m_path == "/");
assert(m_patch->parent_patch() == NULL);
- om->audio_driver()->set_root_patch(m_patch);
+ Ingen::instance().audio_driver()->set_root_patch(m_patch);
} else {
assert(m_parent != NULL);
assert(m_path != "/");
@@ -106,7 +105,7 @@ CreatePatchEvent::execute(samplecount offset)
m_patch->add_to_patch();
if (m_parent->process_order() != NULL)
- om->maid()->push(m_parent->process_order());
+ Ingen::instance().maid()->push(m_parent->process_order());
m_parent->process_order(m_process_order);
}
}
@@ -122,10 +121,10 @@ CreatePatchEvent::post_process()
_responder->respond_ok();
// Don't want to send nodes that have been added since prepare()
- //om->client_broadcaster()->send_node_creation_messages(m_patch);
+ //Ingen::instance().client_broadcaster()->send_node_creation_messages(m_patch);
// Patches are always empty on creation, so this is fine
- om->client_broadcaster()->send_patch(m_patch);
+ Ingen::instance().client_broadcaster()->send_patch(m_patch);
} else if (m_error == OBJECT_EXISTS) {
string msg = "Unable to create patch: ";
diff --git a/src/libs/engine/events/CreatePatchEvent.h b/src/libs/engine/events/CreatePatchEvent.h
index 0be7723a..cbaca4fb 100644
--- a/src/libs/engine/events/CreatePatchEvent.h
+++ b/src/libs/engine/events/CreatePatchEvent.h
@@ -39,10 +39,10 @@ class Plugin;
class CreatePatchEvent : public QueuedEvent
{
public:
- CreatePatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, int poly);
+ CreatePatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp
index f8514631..290d177a 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.cpp
+++ b/src/libs/engine/events/DSSIConfigureEvent.cpp
@@ -15,8 +15,7 @@
*/
#include "DSSIConfigureEvent.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Node.h"
#include "ClientBroadcaster.h"
#include "Plugin.h"
@@ -25,7 +24,7 @@
namespace Om {
-DSSIConfigureEvent::DSSIConfigureEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, const string& key, const string& val)
+DSSIConfigureEvent::DSSIConfigureEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val)
: QueuedEvent(responder, timestamp),
m_node_path(node_path),
m_key(key),
@@ -38,7 +37,7 @@ DSSIConfigureEvent::DSSIConfigureEvent(CountedPtr<Responder> responder, sampleco
void
DSSIConfigureEvent::pre_process()
{
- Node* node = om->object_store()->find_node(m_node_path);
+ Node* node = Ingen::instance().object_store()->find_node(m_node_path);
if (node != NULL && node->plugin()->type() == Plugin::DSSI) {
m_node = (DSSINode*)node;
@@ -50,7 +49,7 @@ DSSIConfigureEvent::pre_process()
void
-DSSIConfigureEvent::execute(samplecount offset)
+DSSIConfigureEvent::execute(SampleCount offset)
{
// Nothing.
}
@@ -64,7 +63,7 @@ DSSIConfigureEvent::post_process()
} else {
string key = "dssi-configure--";
key += m_key;
- om->client_broadcaster()->send_metadata_update(m_node_path, key, m_val);
+ Ingen::instance().client_broadcaster()->send_metadata_update(m_node_path, key, m_val);
}
}
diff --git a/src/libs/engine/events/DSSIConfigureEvent.h b/src/libs/engine/events/DSSIConfigureEvent.h
index c9a4402a..6d0a1000 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.h
+++ b/src/libs/engine/events/DSSIConfigureEvent.h
@@ -30,10 +30,10 @@ namespace Om {
class DSSIConfigureEvent : public QueuedEvent
{
public:
- DSSIConfigureEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, const string& key, const string& val);
+ DSSIConfigureEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp
index 534c5c0a..568ef573 100644
--- a/src/libs/engine/events/DSSIControlEvent.cpp
+++ b/src/libs/engine/events/DSSIControlEvent.cpp
@@ -15,8 +15,7 @@
*/
#include "DSSIControlEvent.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Node.h"
#include "Plugin.h"
#include "ObjectStore.h"
@@ -24,7 +23,7 @@
namespace Om {
-DSSIControlEvent::DSSIControlEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, int port_num, sample val)
+DSSIControlEvent::DSSIControlEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val)
: QueuedEvent(responder, timestamp),
m_node_path(node_path),
m_port_num(port_num),
@@ -37,7 +36,7 @@ DSSIControlEvent::DSSIControlEvent(CountedPtr<Responder> responder, samplecount
void
DSSIControlEvent::pre_process()
{
- Node* node = om->object_store()->find_node(m_node_path);
+ Node* node = Ingen::instance().object_store()->find_node(m_node_path);
if (node->plugin()->type() != Plugin::DSSI)
m_node = NULL;
@@ -49,7 +48,7 @@ DSSIControlEvent::pre_process()
void
-DSSIControlEvent::execute(samplecount offset)
+DSSIControlEvent::execute(SampleCount offset)
{
if (m_node != NULL)
m_node->set_control(m_port_num, m_val);
diff --git a/src/libs/engine/events/DSSIControlEvent.h b/src/libs/engine/events/DSSIControlEvent.h
index 1bc055fe..52df88a8 100644
--- a/src/libs/engine/events/DSSIControlEvent.h
+++ b/src/libs/engine/events/DSSIControlEvent.h
@@ -32,10 +32,10 @@ namespace Om {
class DSSIControlEvent : public QueuedEvent
{
public:
- DSSIControlEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, int port_num, sample val);
+ DSSIControlEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp
index 9b5a85dd..a9f82b33 100644
--- a/src/libs/engine/events/DSSIProgramEvent.cpp
+++ b/src/libs/engine/events/DSSIProgramEvent.cpp
@@ -17,8 +17,7 @@
#include "DSSIProgramEvent.h"
#include <cstdio>
#include <iostream>
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Node.h"
#include "ClientBroadcaster.h"
#include "Plugin.h"
@@ -29,7 +28,7 @@ using std::cout; using std::cerr; using std::endl;
namespace Om {
-DSSIProgramEvent::DSSIProgramEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, int bank, int program)
+DSSIProgramEvent::DSSIProgramEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program)
: QueuedEvent(responder, timestamp),
m_node_path(node_path),
m_bank(bank),
@@ -42,7 +41,7 @@ DSSIProgramEvent::DSSIProgramEvent(CountedPtr<Responder> responder, samplecount
void
DSSIProgramEvent::pre_process()
{
- Node* node = om->object_store()->find_node(m_node_path);
+ Node* node = Ingen::instance().object_store()->find_node(m_node_path);
if (node != NULL && node->plugin()->type() == Plugin::DSSI)
m_node = (DSSINode*)node;
@@ -52,7 +51,7 @@ DSSIProgramEvent::pre_process()
void
-DSSIProgramEvent::execute(samplecount offset)
+DSSIProgramEvent::execute(SampleCount offset)
{
if (m_node != NULL)
m_node->program(m_bank, m_program);
@@ -68,7 +67,7 @@ DSSIProgramEvent::post_process()
// sends program as metadata in the form bank/program
char* temp_buf = new char[16];
snprintf(temp_buf, 16, "%d/%d", m_bank, m_program);
- om->client_broadcaster()->send_metadata_update(m_node_path, "dssi-program", temp_buf);
+ Ingen::instance().client_broadcaster()->send_metadata_update(m_node_path, "dssi-program", temp_buf);
}
}
diff --git a/src/libs/engine/events/DSSIProgramEvent.h b/src/libs/engine/events/DSSIProgramEvent.h
index 59d364b5..6ac0dd5f 100644
--- a/src/libs/engine/events/DSSIProgramEvent.h
+++ b/src/libs/engine/events/DSSIProgramEvent.h
@@ -30,10 +30,10 @@ namespace Om {
class DSSIProgramEvent : public QueuedEvent
{
public:
- DSSIProgramEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, int bank, int program);
+ DSSIProgramEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp
index 216428ac..9a0a6585 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.cpp
+++ b/src/libs/engine/events/DSSIUpdateEvent.cpp
@@ -18,8 +18,7 @@
#include <iostream>
#include "Node.h"
#include "ObjectStore.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "DSSINode.h"
#include "Plugin.h"
@@ -28,7 +27,7 @@ using std::cerr; using std::endl;
namespace Om {
-DSSIUpdateEvent::DSSIUpdateEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& url)
+DSSIUpdateEvent::DSSIUpdateEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url)
: QueuedEvent(responder, timestamp),
m_path(path),
m_url(url),
@@ -40,7 +39,7 @@ DSSIUpdateEvent::DSSIUpdateEvent(CountedPtr<Responder> responder, samplecount ti
void
DSSIUpdateEvent::pre_process()
{
- Node* node = om->object_store()->find_node(m_path);
+ Node* node = Ingen::instance().object_store()->find_node(m_path);
if (node == NULL || node->plugin()->type() != Plugin::DSSI) {
m_node = NULL;
@@ -55,7 +54,7 @@ DSSIUpdateEvent::pre_process()
void
-DSSIUpdateEvent::execute(samplecount offset)
+DSSIUpdateEvent::execute(SampleCount offset)
{
if (m_node != NULL) {
m_node->set_ui_url(m_url);
diff --git a/src/libs/engine/events/DSSIUpdateEvent.h b/src/libs/engine/events/DSSIUpdateEvent.h
index 184dd29a..5182e3f0 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.h
+++ b/src/libs/engine/events/DSSIUpdateEvent.h
@@ -36,10 +36,10 @@ class DSSINode;
class DSSIUpdateEvent : public QueuedEvent
{
public:
- DSSIUpdateEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& url);
+ DSSIUpdateEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DeactivateEvent.cpp b/src/libs/engine/events/DeactivateEvent.cpp
index 0deee46a..803373f1 100644
--- a/src/libs/engine/events/DeactivateEvent.cpp
+++ b/src/libs/engine/events/DeactivateEvent.cpp
@@ -16,13 +16,12 @@
#include "DeactivateEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
namespace Om {
-DeactivateEvent::DeactivateEvent(CountedPtr<Responder> responder, samplecount timestamp)
+DeactivateEvent::DeactivateEvent(CountedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(responder, timestamp)
{
}
@@ -36,7 +35,7 @@ DeactivateEvent::pre_process()
void
-DeactivateEvent::execute(samplecount offset)
+DeactivateEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
}
@@ -46,7 +45,7 @@ void
DeactivateEvent::post_process()
{
_responder->respond_ok();
- om->deactivate();
+ Ingen::instance().deactivate();
}
diff --git a/src/libs/engine/events/DeactivateEvent.h b/src/libs/engine/events/DeactivateEvent.h
index 5e0d2880..27c2aa33 100644
--- a/src/libs/engine/events/DeactivateEvent.h
+++ b/src/libs/engine/events/DeactivateEvent.h
@@ -29,10 +29,10 @@ namespace Om {
class DeactivateEvent : public QueuedEvent
{
public:
- DeactivateEvent(CountedPtr<Responder> responder, samplecount timestamp);
+ DeactivateEvent(CountedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
};
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index b4b54080..1725f608 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -16,8 +16,7 @@
#include "DestroyEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Patch.h"
#include "Tree.h"
#include "Node.h"
@@ -35,7 +34,7 @@
namespace Om {
-DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, samplecount timestamp, QueuedEventSource* source, const string& path, bool lock_mutex)
+DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, SampleCount timestamp, QueuedEventSource* source, const string& path, bool lock_mutex)
: QueuedEvent(responder, true, source),
m_path(path),
m_node(NULL),
@@ -48,7 +47,7 @@ DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, samplecount timestam
}
-DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, samplecount timestamp, Node* node, bool lock_mutex)
+DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, SampleCount timestamp, Node* node, bool lock_mutex)
: QueuedEvent(responder, true),
m_path(node->path()),
m_node(node),
@@ -72,7 +71,7 @@ void
DestroyEvent::pre_process()
{
if (m_node == NULL)
- m_node = om->object_store()->find_node(m_path);
+ m_node = Ingen::instance().object_store()->find_node(m_path);
if (m_node != NULL && m_path != "/") {
assert(m_node->parent_patch() != NULL);
@@ -117,7 +116,7 @@ DestroyEvent::pre_process()
void
-DestroyEvent::execute(samplecount offset)
+DestroyEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
@@ -130,7 +129,7 @@ DestroyEvent::execute(samplecount offset)
m_parent_disconnect_event->execute(offset);
if (m_node->parent_patch()->process_order() != NULL)
- om->maid()->push(m_node->parent_patch()->process_order());
+ Ingen::instance().maid()->push(m_node->parent_patch()->process_order());
m_node->parent_patch()->process_order(m_process_order);
}
}
@@ -154,9 +153,9 @@ DestroyEvent::post_process()
m_disconnect_event->post_process();
if (m_parent_disconnect_event != NULL)
m_parent_disconnect_event->post_process();
- om->client_broadcaster()->send_destroyed(m_path);
- om->maid()->push(m_patch_listnode);
- om->maid()->push(m_node);
+ Ingen::instance().client_broadcaster()->send_destroyed(m_path);
+ Ingen::instance().maid()->push(m_patch_listnode);
+ Ingen::instance().maid()->push(m_node);
} else {
_responder->respond_error("Unable to destroy object");
}
diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h
index d101c00a..4f94e6a0 100644
--- a/src/libs/engine/events/DestroyEvent.h
+++ b/src/libs/engine/events/DestroyEvent.h
@@ -44,12 +44,12 @@ class DisconnectPortEvent;
class DestroyEvent : public QueuedEvent
{
public:
- DestroyEvent(CountedPtr<Responder> responder, samplecount timestamp, QueuedEventSource* source, const string& path, bool lock_mutex = true);
- DestroyEvent(CountedPtr<Responder> responder, samplecount timestamp, Node* node, bool lock_mutex = true);
+ DestroyEvent(CountedPtr<Responder> responder, SampleCount timestamp, QueuedEventSource* source, const string& path, bool lock_mutex = true);
+ DestroyEvent(CountedPtr<Responder> responder, SampleCount timestamp, Node* node, bool lock_mutex = true);
~DestroyEvent();
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp
index aa141b9c..42f0ecdf 100644
--- a/src/libs/engine/events/DisablePatchEvent.cpp
+++ b/src/libs/engine/events/DisablePatchEvent.cpp
@@ -16,8 +16,7 @@
#include "DisablePatchEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Patch.h"
#include "ClientBroadcaster.h"
#include "util.h"
@@ -27,7 +26,7 @@
namespace Om {
-DisablePatchEvent::DisablePatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path)
+DisablePatchEvent::DisablePatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(responder, timestamp),
m_patch_path(patch_path),
m_patch(NULL)
@@ -38,14 +37,14 @@ DisablePatchEvent::DisablePatchEvent(CountedPtr<Responder> responder, samplecoun
void
DisablePatchEvent::pre_process()
{
- m_patch = om->object_store()->find_patch(m_patch_path);
+ m_patch = Ingen::instance().object_store()->find_patch(m_patch_path);
QueuedEvent::pre_process();
}
void
-DisablePatchEvent::execute(samplecount offset)
+DisablePatchEvent::execute(SampleCount offset)
{
if (m_patch != NULL)
m_patch->process(false);
@@ -59,7 +58,7 @@ DisablePatchEvent::post_process()
{
if (m_patch != NULL) {
_responder->respond_ok();
- om->client_broadcaster()->send_patch_disable(m_patch_path);
+ Ingen::instance().client_broadcaster()->send_patch_disable(m_patch_path);
} else {
_responder->respond_error(string("Patch ") + m_patch_path + " not found");
}
diff --git a/src/libs/engine/events/DisablePatchEvent.h b/src/libs/engine/events/DisablePatchEvent.h
index 52fbc81b..b6a21a23 100644
--- a/src/libs/engine/events/DisablePatchEvent.h
+++ b/src/libs/engine/events/DisablePatchEvent.h
@@ -34,10 +34,10 @@ class Patch;
class DisablePatchEvent : public QueuedEvent
{
public:
- DisablePatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path);
+ DisablePatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp
index 3d2407a2..7b746fd1 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.cpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.cpp
@@ -17,8 +17,7 @@
#include "DisconnectNodeEvent.h"
#include <iostream>
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Maid.h"
#include "List.h"
#include "Node.h"
@@ -39,7 +38,7 @@ using std::cerr; using std::endl;
namespace Om {
-DisconnectNodeEvent::DisconnectNodeEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path)
+DisconnectNodeEvent::DisconnectNodeEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(responder, timestamp),
m_node_path(node_path),
m_patch(NULL),
@@ -78,7 +77,7 @@ DisconnectNodeEvent::pre_process()
// cerr << "Preparing disconnection event...\n";
if (m_lookup) {
- m_patch = om->object_store()->find_patch(m_node_path.parent());
+ m_patch = Ingen::instance().object_store()->find_patch(m_node_path.parent());
if (m_patch == NULL) {
m_succeeded = false;
@@ -86,7 +85,7 @@ DisconnectNodeEvent::pre_process()
return;
}
- m_node = om->object_store()->find_node(m_node_path);
+ m_node = Ingen::instance().object_store()->find_node(m_node_path);
if (m_node == NULL) {
m_succeeded = false;
@@ -113,7 +112,7 @@ DisconnectNodeEvent::pre_process()
void
-DisconnectNodeEvent::execute(samplecount offset)
+DisconnectNodeEvent::execute(SampleCount offset)
{
if (m_succeeded) {
for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
diff --git a/src/libs/engine/events/DisconnectNodeEvent.h b/src/libs/engine/events/DisconnectNodeEvent.h
index 0e679dc0..7623bc40 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.h
+++ b/src/libs/engine/events/DisconnectNodeEvent.h
@@ -42,12 +42,12 @@ template <typename T> class OutputPort;
class DisconnectNodeEvent : public QueuedEvent
{
public:
- DisconnectNodeEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path);
+ DisconnectNodeEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path);
DisconnectNodeEvent(Node* node);
~DisconnectNodeEvent();
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp
index d62e3b2c..a3b93727 100644
--- a/src/libs/engine/events/DisconnectPortEvent.cpp
+++ b/src/libs/engine/events/DisconnectPortEvent.cpp
@@ -17,8 +17,7 @@
#include "DisconnectPortEvent.h"
#include <iostream>
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Maid.h"
#include "List.h"
#include "Node.h"
@@ -39,7 +38,7 @@ using std::cerr; using std::endl;
namespace Om {
-DisconnectPortEvent::DisconnectPortEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path)
+DisconnectPortEvent::DisconnectPortEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(responder, timestamp),
m_port_path(port_path),
m_patch(NULL),
@@ -77,7 +76,7 @@ DisconnectPortEvent::pre_process()
// cerr << "Preparing disconnection event...\n";
if (m_lookup) {
- m_patch = om->object_store()->find_patch(m_port_path.parent().parent());
+ m_patch = Ingen::instance().object_store()->find_patch(m_port_path.parent().parent());
if (m_patch == NULL) {
m_succeeded = false;
@@ -85,7 +84,7 @@ DisconnectPortEvent::pre_process()
return;
}
- m_port = om->object_store()->find_port(m_port_path);
+ m_port = Ingen::instance().object_store()->find_port(m_port_path);
if (m_port == NULL) {
m_succeeded = false;
@@ -118,7 +117,7 @@ DisconnectPortEvent::pre_process()
void
-DisconnectPortEvent::execute(samplecount offset)
+DisconnectPortEvent::execute(SampleCount offset)
{
if (m_succeeded) {
for (List<DisconnectionEvent*>::iterator i = m_disconnection_events.begin(); i != m_disconnection_events.end(); ++i)
diff --git a/src/libs/engine/events/DisconnectPortEvent.h b/src/libs/engine/events/DisconnectPortEvent.h
index b52401ba..0beee4b9 100644
--- a/src/libs/engine/events/DisconnectPortEvent.h
+++ b/src/libs/engine/events/DisconnectPortEvent.h
@@ -43,12 +43,12 @@ using std::string;
class DisconnectPortEvent : public QueuedEvent
{
public:
- DisconnectPortEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path);
+ DisconnectPortEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
DisconnectPortEvent(Port* port);
~DisconnectPortEvent();
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp
index e30d851f..29caf45c 100644
--- a/src/libs/engine/events/DisconnectionEvent.cpp
+++ b/src/libs/engine/events/DisconnectionEvent.cpp
@@ -17,8 +17,7 @@
#include "DisconnectionEvent.h"
#include <string>
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "TypedConnection.h"
#include "InputPort.h"
#include "OutputPort.h"
@@ -36,7 +35,7 @@ namespace Om {
//// DisconnectionEvent ////
-DisconnectionEvent::DisconnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& src_port_path, const string& dst_port_path)
+DisconnectionEvent::DisconnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(responder, timestamp),
m_src_port_path(src_port_path),
m_dst_port_path(dst_port_path),
@@ -50,7 +49,7 @@ DisconnectionEvent::DisconnectionEvent(CountedPtr<Responder> responder, sampleco
}
-DisconnectionEvent::DisconnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, Port* const src_port, Port* const dst_port)
+DisconnectionEvent::DisconnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port)
: QueuedEvent(responder, timestamp),
m_src_port_path(src_port->path()),
m_dst_port_path(dst_port->path()),
@@ -86,7 +85,7 @@ DisconnectionEvent::pre_process()
return;
}
- /*m_patch = om->object_store()->find_patch(m_src_port_path.parent().parent());
+ /*m_patch = Ingen::instance().object_store()->find_patch(m_src_port_path.parent().parent());
if (m_patch == NULL) {
m_error = PORT_NOT_FOUND;
@@ -94,8 +93,8 @@ DisconnectionEvent::pre_process()
return;
}*/
- m_src_port = om->object_store()->find_port(m_src_port_path);
- m_dst_port = om->object_store()->find_port(m_dst_port_path);
+ m_src_port = Ingen::instance().object_store()->find_port(m_src_port_path);
+ m_dst_port = Ingen::instance().object_store()->find_port(m_dst_port_path);
}
if (m_src_port == NULL || m_dst_port == NULL) {
@@ -113,8 +112,8 @@ DisconnectionEvent::pre_process()
// Create the typed event to actually do the work
const DataType type = m_src_port->type();
if (type == DataType::FLOAT) {
- m_typed_event = new TypedDisconnectionEvent<sample>(_responder, _time_stamp,
- dynamic_cast<OutputPort<sample>*>(m_src_port), dynamic_cast<InputPort<sample>*>(m_dst_port));
+ m_typed_event = new TypedDisconnectionEvent<Sample>(_responder, _time_stamp,
+ dynamic_cast<OutputPort<Sample>*>(m_src_port), dynamic_cast<InputPort<Sample>*>(m_dst_port));
} else if (type == DataType::MIDI) {
m_typed_event = new TypedDisconnectionEvent<MidiMessage>(_responder, _time_stamp,
dynamic_cast<OutputPort<MidiMessage>*>(m_src_port), dynamic_cast<InputPort<MidiMessage>*>(m_dst_port));
@@ -132,7 +131,7 @@ DisconnectionEvent::pre_process()
void
-DisconnectionEvent::execute(samplecount offset)
+DisconnectionEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
@@ -160,7 +159,7 @@ DisconnectionEvent::post_process()
template <typename T>
-TypedDisconnectionEvent<T>::TypedDisconnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
+TypedDisconnectionEvent<T>::TypedDisconnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(responder, timestamp),
m_src_port(src_port),
m_dst_port(dst_port),
@@ -234,7 +233,7 @@ TypedDisconnectionEvent<T>::pre_process()
template <typename T>
void
-TypedDisconnectionEvent<T>::execute(samplecount offset)
+TypedDisconnectionEvent<T>::execute(SampleCount offset)
{
if (m_succeeded) {
@@ -249,12 +248,12 @@ TypedDisconnectionEvent<T>::execute(samplecount offset)
assert((Connection*)port_connection->elem() == patch_connection->elem());
// Clean up both the list node and the connection itself...
- om->maid()->push(port_connection);
- om->maid()->push(patch_connection);
- om->maid()->push(port_connection->elem());
+ Ingen::instance().maid()->push(port_connection);
+ Ingen::instance().maid()->push(patch_connection);
+ Ingen::instance().maid()->push(port_connection->elem());
if (m_patch->process_order() != NULL)
- om->maid()->push(m_patch->process_order());
+ Ingen::instance().maid()->push(m_patch->process_order());
m_patch->process_order(m_process_order);
} else {
m_succeeded = false; // Ports weren't connected
@@ -272,7 +271,7 @@ TypedDisconnectionEvent<T>::post_process()
_responder->respond_ok();
- om->client_broadcaster()->send_disconnection(m_src_port->path(), m_dst_port->path());
+ Ingen::instance().client_broadcaster()->send_disconnection(m_src_port->path(), m_dst_port->path());
} else {
_responder->respond_error("Unable to disconnect ports.");
}
diff --git a/src/libs/engine/events/DisconnectionEvent.h b/src/libs/engine/events/DisconnectionEvent.h
index 4a259855..3fe95fad 100644
--- a/src/libs/engine/events/DisconnectionEvent.h
+++ b/src/libs/engine/events/DisconnectionEvent.h
@@ -46,12 +46,12 @@ template <typename T> class TypedDisconnectionEvent; // helper, defined below
class DisconnectionEvent : public QueuedEvent
{
public:
- DisconnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& src_port_path, const string& dst_port_path);
- DisconnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, Port* const src_port, Port* const dst_port);
+ DisconnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path);
+ DisconnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port);
~DisconnectionEvent();
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
@@ -82,10 +82,10 @@ template <typename T>
class TypedDisconnectionEvent : public QueuedEvent
{
public:
- TypedDisconnectionEvent(CountedPtr<Responder> responder, samplecount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port);
+ TypedDisconnectionEvent(CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp
index 8bf769b4..042acd12 100644
--- a/src/libs/engine/events/EnablePatchEvent.cpp
+++ b/src/libs/engine/events/EnablePatchEvent.cpp
@@ -16,8 +16,7 @@
#include "EnablePatchEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "Patch.h"
#include "util.h"
#include "ClientBroadcaster.h"
@@ -26,7 +25,7 @@
namespace Om {
-EnablePatchEvent::EnablePatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path)
+EnablePatchEvent::EnablePatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(responder, timestamp),
m_patch_path(patch_path),
m_patch(NULL),
@@ -38,7 +37,7 @@ EnablePatchEvent::EnablePatchEvent(CountedPtr<Responder> responder, samplecount
void
EnablePatchEvent::pre_process()
{
- m_patch = om->object_store()->find_patch(m_patch_path);
+ m_patch = Ingen::instance().object_store()->find_patch(m_patch_path);
if (m_patch != NULL) {
/* Any event that requires a new process order will set the patch's
@@ -53,7 +52,7 @@ EnablePatchEvent::pre_process()
void
-EnablePatchEvent::execute(samplecount offset)
+EnablePatchEvent::execute(SampleCount offset)
{
if (m_patch != NULL) {
m_patch->process(true);
@@ -71,7 +70,7 @@ EnablePatchEvent::post_process()
{
if (m_patch != NULL) {
_responder->respond_ok();
- om->client_broadcaster()->send_patch_enable(m_patch_path);
+ Ingen::instance().client_broadcaster()->send_patch_enable(m_patch_path);
} else {
_responder->respond_error(string("Patch ") + m_patch_path + " not found");
}
diff --git a/src/libs/engine/events/EnablePatchEvent.h b/src/libs/engine/events/EnablePatchEvent.h
index b2b3e300..1984f72c 100644
--- a/src/libs/engine/events/EnablePatchEvent.h
+++ b/src/libs/engine/events/EnablePatchEvent.h
@@ -37,10 +37,10 @@ class Node;
class EnablePatchEvent : public QueuedEvent
{
public:
- EnablePatchEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& patch_path);
+ EnablePatchEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/LashRestoreDoneEvent.h b/src/libs/engine/events/LashRestoreDoneEvent.h
index c6dd0392..b090e01d 100644
--- a/src/libs/engine/events/LashRestoreDoneEvent.h
+++ b/src/libs/engine/events/LashRestoreDoneEvent.h
@@ -39,7 +39,7 @@ class Port;
class LashRestoreDoneEvent : public QueuedEvent
{
public:
- LashRestoreDoneEvent(CountedPtr<Responder> responder, samplecount timestamp) : QueuedEvent(responder, timestamp) {}
+ LashRestoreDoneEvent(CountedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(responder, timestamp) {}
void post_process()
{
diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp
index f35fc2fb..317171ba 100644
--- a/src/libs/engine/events/LoadPluginsEvent.cpp
+++ b/src/libs/engine/events/LoadPluginsEvent.cpp
@@ -16,8 +16,7 @@
#include "LoadPluginsEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "NodeFactory.h"
#include <iostream>
@@ -26,11 +25,11 @@ using std::cerr;
namespace Om {
-LoadPluginsEvent::LoadPluginsEvent(CountedPtr<Responder> responder, samplecount timestamp)
+LoadPluginsEvent::LoadPluginsEvent(CountedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(responder, timestamp)
{
cerr << "LOADING PLUGINS\n";
- om->node_factory()->load_plugins();
+ Ingen::instance().node_factory()->load_plugins();
}
diff --git a/src/libs/engine/events/LoadPluginsEvent.h b/src/libs/engine/events/LoadPluginsEvent.h
index 435d6f15..9600bdbc 100644
--- a/src/libs/engine/events/LoadPluginsEvent.h
+++ b/src/libs/engine/events/LoadPluginsEvent.h
@@ -29,7 +29,7 @@ namespace Om {
class LoadPluginsEvent : public QueuedEvent
{
public:
- LoadPluginsEvent(CountedPtr<Responder> responder, samplecount timestamp);
+ LoadPluginsEvent(CountedPtr<Responder> responder, SampleCount timestamp);
void post_process();
};
diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp
index b1cfb69d..be0597f1 100644
--- a/src/libs/engine/events/MidiLearnEvent.cpp
+++ b/src/libs/engine/events/MidiLearnEvent.cpp
@@ -16,8 +16,7 @@
#include "MidiLearnEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ObjectStore.h"
#include "Node.h"
#include "MidiControlNode.h"
@@ -31,14 +30,14 @@ namespace Om {
void
MidiLearnResponseEvent::post_process()
{
- om->client_broadcaster()->send_control_change(m_port_path, m_value);
+ Ingen::instance().client_broadcaster()->send_control_change(m_port_path, m_value);
}
// MidiLearnEvent
-MidiLearnEvent::MidiLearnEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path)
+MidiLearnEvent::MidiLearnEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(responder, timestamp),
m_node_path(node_path),
m_node(NULL),
@@ -50,7 +49,7 @@ MidiLearnEvent::MidiLearnEvent(CountedPtr<Responder> responder, samplecount time
void
MidiLearnEvent::pre_process()
{
- m_node = om->object_store()->find_node(m_node_path);
+ m_node = Ingen::instance().object_store()->find_node(m_node_path);
m_response_event = new MidiLearnResponseEvent(m_node_path + "/Controller_Number", _time_stamp);
QueuedEvent::pre_process();
@@ -58,7 +57,7 @@ MidiLearnEvent::pre_process()
void
-MidiLearnEvent::execute(samplecount offset)
+MidiLearnEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
diff --git a/src/libs/engine/events/MidiLearnEvent.h b/src/libs/engine/events/MidiLearnEvent.h
index bf4ebae2..26e8d3ec 100644
--- a/src/libs/engine/events/MidiLearnEvent.h
+++ b/src/libs/engine/events/MidiLearnEvent.h
@@ -37,18 +37,18 @@ class ControlChangeEvent;
class MidiLearnResponseEvent : public Event
{
public:
- MidiLearnResponseEvent(const string& port_path, samplecount timestamp)
+ MidiLearnResponseEvent(const string& port_path, SampleCount timestamp)
: Event(NULL, timestamp),
m_port_path(port_path),
m_value(0.0f)
{}
- void set_value(sample val) { m_value = val; }
+ void set_value(Sample val) { m_value = val; }
void post_process();
private:
string m_port_path;
- sample m_value;
+ Sample m_value;
};
@@ -64,10 +64,10 @@ private:
class MidiLearnEvent : public QueuedEvent
{
public:
- MidiLearnEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path);
+ MidiLearnEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp
index cd411d81..39b04f31 100644
--- a/src/libs/engine/events/NoteOffEvent.cpp
+++ b/src/libs/engine/events/NoteOffEvent.cpp
@@ -16,8 +16,7 @@
#include "NoteOffEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ObjectStore.h"
#include "Node.h"
#include "MidiNoteNode.h"
@@ -28,7 +27,7 @@ namespace Om {
/** Note off with patch explicitly passed - triggered by MIDI.
*/
-NoteOffEvent::NoteOffEvent(CountedPtr<Responder> responder, samplecount timestamp, Node* node, uchar note_num)
+NoteOffEvent::NoteOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num)
: Event(responder, timestamp),
m_node(node),
m_note_num(note_num)
@@ -38,7 +37,7 @@ NoteOffEvent::NoteOffEvent(CountedPtr<Responder> responder, samplecount timestam
/** Note off event with lookup - triggered by OSC.
*/
-NoteOffEvent::NoteOffEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, uchar note_num)
+NoteOffEvent::NoteOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num)
: Event(responder, timestamp),
m_node(NULL),
m_node_path(node_path),
@@ -48,10 +47,10 @@ NoteOffEvent::NoteOffEvent(CountedPtr<Responder> responder, samplecount timestam
void
-NoteOffEvent::execute(samplecount offset)
+NoteOffEvent::execute(SampleCount offset)
{
if (m_node == NULL && m_node_path != "")
- m_node = om->object_store()->find_node(m_node_path);
+ m_node = Ingen::instance().object_store()->find_node(m_node_path);
// FIXME: this isn't very good at all.
if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal) {
diff --git a/src/libs/engine/events/NoteOffEvent.h b/src/libs/engine/events/NoteOffEvent.h
index 4e527e62..8bf14dae 100644
--- a/src/libs/engine/events/NoteOffEvent.h
+++ b/src/libs/engine/events/NoteOffEvent.h
@@ -34,10 +34,10 @@ class Node;
class NoteOffEvent : public Event
{
public:
- NoteOffEvent(CountedPtr<Responder> responder, samplecount timestamp, Node* node, uchar note_num);
- NoteOffEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, uchar note_num);
+ NoteOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num);
+ NoteOffEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num);
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/NoteOnEvent.cpp b/src/libs/engine/events/NoteOnEvent.cpp
index bd9531e1..df28c478 100644
--- a/src/libs/engine/events/NoteOnEvent.cpp
+++ b/src/libs/engine/events/NoteOnEvent.cpp
@@ -16,8 +16,7 @@
#include "NoteOnEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ObjectStore.h"
#include "Node.h"
#include "MidiNoteNode.h"
@@ -31,7 +30,7 @@ namespace Om {
*
* Used to be triggered by MIDI. Not used anymore.
*/
-NoteOnEvent::NoteOnEvent(CountedPtr<Responder> responder, samplecount timestamp, Node* patch, uchar note_num, uchar velocity)
+NoteOnEvent::NoteOnEvent(CountedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity)
: Event(responder, timestamp),
m_node(patch),
m_note_num(note_num),
@@ -45,7 +44,7 @@ NoteOnEvent::NoteOnEvent(CountedPtr<Responder> responder, samplecount timestamp,
*
* Triggered by OSC.
*/
-NoteOnEvent::NoteOnEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, uchar note_num, uchar velocity)
+NoteOnEvent::NoteOnEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity)
: Event(responder, timestamp),
m_node(NULL),
m_node_path(node_path),
@@ -57,11 +56,11 @@ NoteOnEvent::NoteOnEvent(CountedPtr<Responder> responder, samplecount timestamp,
void
-NoteOnEvent::execute(samplecount offset)
+NoteOnEvent::execute(SampleCount offset)
{
// Lookup if neccessary
if (m_is_osc_triggered)
- m_node = om->object_store()->find_node(m_node_path);
+ m_node = Ingen::instance().object_store()->find_node(m_node_path);
// FIXME: this isn't very good at all.
if (m_node != NULL && m_node->plugin()->type() == Plugin::Internal) {
diff --git a/src/libs/engine/events/NoteOnEvent.h b/src/libs/engine/events/NoteOnEvent.h
index 91b6d3ac..b0a20b04 100644
--- a/src/libs/engine/events/NoteOnEvent.h
+++ b/src/libs/engine/events/NoteOnEvent.h
@@ -34,10 +34,10 @@ class Node;
class NoteOnEvent : public Event
{
public:
- NoteOnEvent(CountedPtr<Responder> responder, samplecount timestamp, Node* patch, uchar note_num, uchar velocity);
- NoteOnEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, uchar note_num, uchar velocity);
+ NoteOnEvent(CountedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity);
+ NoteOnEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity);
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/PingQueuedEvent.h b/src/libs/engine/events/PingQueuedEvent.h
index c6dab069..92b965c4 100644
--- a/src/libs/engine/events/PingQueuedEvent.h
+++ b/src/libs/engine/events/PingQueuedEvent.h
@@ -34,7 +34,7 @@ class Port;
class PingQueuedEvent : public QueuedEvent
{
public:
- PingQueuedEvent(CountedPtr<Responder> responder, samplecount timestamp) : QueuedEvent(responder, timestamp) {}
+ PingQueuedEvent(CountedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(responder, timestamp) {}
void post_process() { _responder->respond_ok(); }
};
diff --git a/src/libs/engine/events/RegisterClientEvent.cpp b/src/libs/engine/events/RegisterClientEvent.cpp
index 2c3c8dbf..54c47ce6 100644
--- a/src/libs/engine/events/RegisterClientEvent.cpp
+++ b/src/libs/engine/events/RegisterClientEvent.cpp
@@ -16,15 +16,14 @@
#include "RegisterClientEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ClientBroadcaster.h"
namespace Om {
RegisterClientEvent::RegisterClientEvent(CountedPtr<Responder> responder,
- samplecount timestamp,
+ SampleCount timestamp,
ClientKey key,
CountedPtr<ClientInterface> client)
: QueuedEvent(responder, timestamp)
@@ -37,7 +36,7 @@ RegisterClientEvent::RegisterClientEvent(CountedPtr<Responder> responder,
void
RegisterClientEvent::pre_process()
{
- om->client_broadcaster()->register_client(_key, _client);
+ Ingen::instance().client_broadcaster()->register_client(_key, _client);
QueuedEvent::pre_process();
}
diff --git a/src/libs/engine/events/RegisterClientEvent.h b/src/libs/engine/events/RegisterClientEvent.h
index ba55a241..4e0dee7e 100644
--- a/src/libs/engine/events/RegisterClientEvent.h
+++ b/src/libs/engine/events/RegisterClientEvent.h
@@ -36,7 +36,7 @@ class RegisterClientEvent : public QueuedEvent
{
public:
RegisterClientEvent(CountedPtr<Responder> responder,
- samplecount timestamp,
+ SampleCount timestamp,
ClientKey key,
CountedPtr<ClientInterface> client);
diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp
index 5cd9a19a..a383fc3b 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -19,8 +19,7 @@
#include "Patch.h"
#include "Node.h"
#include "Tree.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ClientBroadcaster.h"
#include "util/Path.h"
#include "ObjectStore.h"
@@ -28,7 +27,7 @@
namespace Om {
-RenameEvent::RenameEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& name)
+RenameEvent::RenameEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name)
: QueuedEvent(responder, timestamp),
m_old_path(path),
m_name(name),
@@ -59,13 +58,13 @@ RenameEvent::pre_process()
return;
}
- if (om->object_store()->find(m_new_path)) {
+ if (Ingen::instance().object_store()->find(m_new_path)) {
m_error = OBJECT_EXISTS;
QueuedEvent::pre_process();
return;
}
- GraphObject* obj = om->object_store()->find(m_old_path);
+ GraphObject* obj = Ingen::instance().object_store()->find(m_old_path);
if (obj == NULL) {
m_error = OBJECT_NOT_FOUND;
@@ -90,7 +89,7 @@ RenameEvent::pre_process()
void
-RenameEvent::execute(samplecount offset)
+RenameEvent::execute(SampleCount offset)
{
//cout << "Executing rename event...";
QueuedEvent::execute(offset);
@@ -104,7 +103,7 @@ RenameEvent::post_process()
if (m_error == NO_ERROR) {
_responder->respond_ok();
- om->client_broadcaster()->send_rename(m_old_path, m_new_path);
+ Ingen::instance().client_broadcaster()->send_rename(m_old_path, m_new_path);
} else {
if (m_error == OBJECT_EXISTS)
msg.append("Object already exists at ").append(m_new_path);
diff --git a/src/libs/engine/events/RenameEvent.h b/src/libs/engine/events/RenameEvent.h
index db1bdd41..bfd726d6 100644
--- a/src/libs/engine/events/RenameEvent.h
+++ b/src/libs/engine/events/RenameEvent.h
@@ -42,11 +42,11 @@ class DisconnectPortEvent;
class RenameEvent : public QueuedEvent
{
public:
- RenameEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& name);
+ RenameEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name);
~RenameEvent();
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp
index 702325ea..0260dd65 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.cpp
+++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp
@@ -16,14 +16,13 @@
#include "RequestAllObjectsEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ObjectSender.h"
namespace Om {
-RequestAllObjectsEvent::RequestAllObjectsEvent(CountedPtr<Responder> responder, samplecount timestamp)
+RequestAllObjectsEvent::RequestAllObjectsEvent(CountedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(responder, timestamp),
m_client(CountedPtr<ClientInterface>(NULL))
{
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.h b/src/libs/engine/events/RequestAllObjectsEvent.h
index 44f3603d..a37b953f 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.h
+++ b/src/libs/engine/events/RequestAllObjectsEvent.h
@@ -35,7 +35,7 @@ namespace Shared {
class RequestAllObjectsEvent : public QueuedEvent
{
public:
- RequestAllObjectsEvent(CountedPtr<Responder> responder, samplecount timestamp);
+ RequestAllObjectsEvent(CountedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
void post_process();
diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp
index 54a9fa0a..860d9f3f 100644
--- a/src/libs/engine/events/RequestMetadataEvent.cpp
+++ b/src/libs/engine/events/RequestMetadataEvent.cpp
@@ -17,8 +17,7 @@
#include "RequestMetadataEvent.h"
#include <string>
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "GraphObject.h"
#include "ObjectStore.h"
#include "interface/ClientInterface.h"
@@ -28,7 +27,7 @@ using std::string;
namespace Om {
-RequestMetadataEvent::RequestMetadataEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& node_path, const string& key)
+RequestMetadataEvent::RequestMetadataEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key)
: QueuedEvent(responder, timestamp),
m_path(node_path),
m_key(key),
@@ -45,7 +44,7 @@ RequestMetadataEvent::pre_process()
m_client = _responder->find_client();
if (m_client) {
- m_object = om->object_store()->find(m_path);
+ m_object = Ingen::instance().object_store()->find(m_path);
if (m_object == NULL) {
QueuedEvent::pre_process();
return;
diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h
index b84a0094..1da4ffe6 100644
--- a/src/libs/engine/events/RequestMetadataEvent.h
+++ b/src/libs/engine/events/RequestMetadataEvent.h
@@ -37,7 +37,7 @@ namespace Shared {
class RequestMetadataEvent : public QueuedEvent
{
public:
- RequestMetadataEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& key);
+ RequestMetadataEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key);
void pre_process();
void post_process();
diff --git a/src/libs/engine/events/RequestPluginsEvent.cpp b/src/libs/engine/events/RequestPluginsEvent.cpp
index 6f3a92a8..286badb4 100644
--- a/src/libs/engine/events/RequestPluginsEvent.cpp
+++ b/src/libs/engine/events/RequestPluginsEvent.cpp
@@ -16,14 +16,13 @@
#include "RequestPluginsEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ClientBroadcaster.h"
namespace Om {
-RequestPluginsEvent::RequestPluginsEvent(CountedPtr<Responder> responder, samplecount timestamp)
+RequestPluginsEvent::RequestPluginsEvent(CountedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(responder, timestamp),
m_client(CountedPtr<ClientInterface>(NULL))
{
@@ -43,7 +42,7 @@ void
RequestPluginsEvent::post_process()
{
if (m_client) {
- om->client_broadcaster()->send_plugins_to(m_client.get());
+ Ingen::instance().client_broadcaster()->send_plugins_to(m_client.get());
_responder->respond_ok();
} else {
_responder->respond_error("Invalid URL");
diff --git a/src/libs/engine/events/RequestPluginsEvent.h b/src/libs/engine/events/RequestPluginsEvent.h
index 240e00db..29bb0958 100644
--- a/src/libs/engine/events/RequestPluginsEvent.h
+++ b/src/libs/engine/events/RequestPluginsEvent.h
@@ -36,7 +36,7 @@ namespace Shared {
class RequestPluginsEvent : public QueuedEvent
{
public:
- RequestPluginsEvent(CountedPtr<Responder> responder, samplecount timestamp);
+ RequestPluginsEvent(CountedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
void post_process();
diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp
index ccdd9312..8cb401dc 100644
--- a/src/libs/engine/events/RequestPortValueEvent.cpp
+++ b/src/libs/engine/events/RequestPortValueEvent.cpp
@@ -17,8 +17,7 @@
#include "RequestPortValueEvent.h"
#include <string>
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "interface/ClientInterface.h"
#include "TypedPort.h"
#include "ObjectStore.h"
@@ -29,7 +28,7 @@ using std::string;
namespace Om {
-RequestPortValueEvent::RequestPortValueEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path)
+RequestPortValueEvent::RequestPortValueEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(responder, timestamp),
m_port_path(port_path),
m_port(NULL),
@@ -43,17 +42,17 @@ void
RequestPortValueEvent::pre_process()
{
m_client = _responder->find_client();
- m_port = om->object_store()->find_port(m_port_path);
+ m_port = Ingen::instance().object_store()->find_port(m_port_path);
QueuedEvent::pre_process();
}
void
-RequestPortValueEvent::execute(samplecount offset)
+RequestPortValueEvent::execute(SampleCount offset)
{
if (m_port != NULL && m_port->type() == DataType::FLOAT)
- m_value = ((TypedPort<sample>*)m_port)->buffer(0)->value_at(offset);
+ m_value = ((TypedPort<Sample>*)m_port)->buffer(0)->value_at(offset);
else
m_port = NULL; // triggers error response
diff --git a/src/libs/engine/events/RequestPortValueEvent.h b/src/libs/engine/events/RequestPortValueEvent.h
index f9f14a41..eba37122 100644
--- a/src/libs/engine/events/RequestPortValueEvent.h
+++ b/src/libs/engine/events/RequestPortValueEvent.h
@@ -37,16 +37,16 @@ using Shared::ClientInterface;
class RequestPortValueEvent : public QueuedEvent
{
public:
- RequestPortValueEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path);
+ RequestPortValueEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
string m_port_path;
Port* m_port;
- sample m_value;
+ Sample m_value;
CountedPtr<ClientInterface> m_client;
};
diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp
index 3ea38c4f..a2a02318 100644
--- a/src/libs/engine/events/SetMetadataEvent.cpp
+++ b/src/libs/engine/events/SetMetadataEvent.cpp
@@ -17,8 +17,7 @@
#include "SetMetadataEvent.h"
#include <string>
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ClientBroadcaster.h"
#include "GraphObject.h"
#include "ObjectStore.h"
@@ -28,7 +27,7 @@ using std::string;
namespace Om {
-SetMetadataEvent::SetMetadataEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& key, const string& value)
+SetMetadataEvent::SetMetadataEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const string& value)
: QueuedEvent(responder, timestamp),
m_path(path),
m_key(key),
@@ -41,7 +40,7 @@ SetMetadataEvent::SetMetadataEvent(CountedPtr<Responder> responder, samplecount
void
SetMetadataEvent::pre_process()
{
- m_object = om->object_store()->find(m_path);
+ m_object = Ingen::instance().object_store()->find(m_path);
if (m_object == NULL) {
QueuedEvent::pre_process();
return;
@@ -54,7 +53,7 @@ SetMetadataEvent::pre_process()
void
-SetMetadataEvent::execute(samplecount offset)
+SetMetadataEvent::execute(SampleCount offset)
{
// Do nothing
@@ -71,7 +70,7 @@ SetMetadataEvent::post_process()
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- om->client_broadcaster()->send_metadata_update(m_path, m_key, m_value);
+ Ingen::instance().client_broadcaster()->send_metadata_update(m_path, m_key, m_value);
}
}
diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h
index 021567a9..40ec5978 100644
--- a/src/libs/engine/events/SetMetadataEvent.h
+++ b/src/libs/engine/events/SetMetadataEvent.h
@@ -34,10 +34,10 @@ class GraphObject;
class SetMetadataEvent : public QueuedEvent
{
public:
- SetMetadataEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& path, const string& key, const string& value);
+ SetMetadataEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const string& value);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp
index 68aec224..f29a89d1 100644
--- a/src/libs/engine/events/SetPortValueEvent.cpp
+++ b/src/libs/engine/events/SetPortValueEvent.cpp
@@ -16,8 +16,7 @@
#include "SetPortValueEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "TypedPort.h"
#include "ClientBroadcaster.h"
#include "Node.h"
@@ -28,7 +27,7 @@ namespace Om {
/** Voice-specific control setting
*/
-SetPortValueEvent::SetPortValueEvent(CountedPtr<Responder> responder, samplecount timestamp, size_t voice_num, const string& port_path, sample val)
+SetPortValueEvent::SetPortValueEvent(CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: Event(responder, timestamp),
m_voice_num(voice_num),
m_port_path(port_path),
@@ -39,7 +38,7 @@ SetPortValueEvent::SetPortValueEvent(CountedPtr<Responder> responder, samplecoun
}
-SetPortValueEvent::SetPortValueEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path, sample val)
+SetPortValueEvent::SetPortValueEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: Event(responder, timestamp),
m_voice_num(-1),
m_port_path(port_path),
@@ -51,10 +50,10 @@ SetPortValueEvent::SetPortValueEvent(CountedPtr<Responder> responder, samplecoun
void
-SetPortValueEvent::execute(samplecount offset)
+SetPortValueEvent::execute(SampleCount offset)
{
if (m_port == NULL)
- m_port = om->object_store()->find_port(m_port_path);
+ m_port = Ingen::instance().object_store()->find_port(m_port_path);
if (m_port == NULL) {
m_error = PORT_NOT_FOUND;
@@ -62,10 +61,10 @@ SetPortValueEvent::execute(samplecount offset)
m_error = TYPE_MISMATCH;
} else {
if (m_voice_num == -1)
- ((TypedPort<sample>*)m_port)->set_value(m_val, offset);
+ ((TypedPort<Sample>*)m_port)->set_value(m_val, offset);
else
- ((TypedPort<sample>*)m_port)->set_value(m_voice_num, m_val, offset);
- //((TypedPort<sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range
+ ((TypedPort<Sample>*)m_port)->set_value(m_voice_num, m_val, offset);
+ //((TypedPort<Sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range
}
}
@@ -77,13 +76,13 @@ SetPortValueEvent::post_process()
assert(m_port != NULL);
_responder->respond_ok();
- om->client_broadcaster()->send_control_change(m_port_path, m_val);
+ Ingen::instance().client_broadcaster()->send_control_change(m_port_path, m_val);
// Send patch port control change, if this is a bridge port
/*Port* parent_port = m_port->parent_node()->as_port();
if (parent_port != NULL) {
assert(parent_port->type() == DataType::FLOAT);
- om->client_broadcaster()->send_control_change(parent_port->path(), m_val);
+ Ingen::instance().client_broadcaster()->send_control_change(parent_port->path(), m_val);
}*/
} else if (m_error == PORT_NOT_FOUND) {
diff --git a/src/libs/engine/events/SetPortValueEvent.h b/src/libs/engine/events/SetPortValueEvent.h
index 0fbc354e..4aca1aaf 100644
--- a/src/libs/engine/events/SetPortValueEvent.h
+++ b/src/libs/engine/events/SetPortValueEvent.h
@@ -34,10 +34,10 @@ class Port;
class SetPortValueEvent : public Event
{
public:
- SetPortValueEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path, sample val);
- SetPortValueEvent(CountedPtr<Responder> responder, samplecount timestamp, size_t voice_num, const string& port_path, sample val);
+ SetPortValueEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val);
+ SetPortValueEvent(CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val);
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
index 134ac462..71d796b1 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
@@ -16,8 +16,7 @@
#include "SetPortValueQueuedEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "TypedPort.h"
#include "ClientBroadcaster.h"
#include "Plugin.h"
@@ -29,7 +28,7 @@ namespace Om {
/** Voice-specific control setting
*/
-SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> responder, samplecount timestamp, size_t voice_num, const string& port_path, sample val)
+SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: QueuedEvent(responder, timestamp),
m_voice_num(voice_num),
m_port_path(port_path),
@@ -40,7 +39,7 @@ SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> responder
}
-SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path, sample val)
+SetPortValueQueuedEvent::SetPortValueQueuedEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: QueuedEvent(responder, timestamp),
m_voice_num(-1),
m_port_path(port_path),
@@ -55,7 +54,7 @@ void
SetPortValueQueuedEvent::pre_process()
{
if (m_port == NULL)
- m_port = om->object_store()->find_port(m_port_path);
+ m_port = Ingen::instance().object_store()->find_port(m_port_path);
if (m_port == NULL) {
m_error = PORT_NOT_FOUND;
@@ -68,16 +67,16 @@ SetPortValueQueuedEvent::pre_process()
void
-SetPortValueQueuedEvent::execute(samplecount offset)
+SetPortValueQueuedEvent::execute(SampleCount offset)
{
QueuedEvent::execute(offset);
if (m_error == NO_ERROR) {
assert(m_port != NULL);
if (m_voice_num == -1)
- ((TypedPort<sample>*)m_port)->set_value(m_val, offset);
+ ((TypedPort<Sample>*)m_port)->set_value(m_val, offset);
else
- ((TypedPort<sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range
+ ((TypedPort<Sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range
}
}
@@ -89,13 +88,13 @@ SetPortValueQueuedEvent::post_process()
assert(m_port != NULL);
_responder->respond_ok();
- om->client_broadcaster()->send_control_change(m_port_path, m_val);
+ Ingen::instance().client_broadcaster()->send_control_change(m_port_path, m_val);
// Send patch port control change, if this is a bridge port
/*Port* parent_port = m_port->parent_node()->as_port();
if (parent_port != NULL) {
assert(parent_port->type() == DataType::FLOAT);
- om->client_broadcaster()->send_control_change(parent_port->path(), m_val);
+ Ingen::instance().client_broadcaster()->send_control_change(parent_port->path(), m_val);
}*/
} else if (m_error == PORT_NOT_FOUND) {
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.h b/src/libs/engine/events/SetPortValueQueuedEvent.h
index 653153f4..2dbca248 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.h
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.h
@@ -34,11 +34,11 @@ class Port;
class SetPortValueQueuedEvent : public QueuedEvent
{
public:
- SetPortValueQueuedEvent(CountedPtr<Responder> responder, samplecount timestamp, const string& port_path, sample val);
- SetPortValueQueuedEvent(CountedPtr<Responder> responder, samplecount timestamp, size_t voice_num, const string& port_path, sample val);
+ SetPortValueQueuedEvent(CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val);
+ SetPortValueQueuedEvent(CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val);
void pre_process();
- void execute(samplecount offset);
+ void execute(SampleCount offset);
void post_process();
private:
diff --git a/src/libs/engine/events/UnregisterClientEvent.cpp b/src/libs/engine/events/UnregisterClientEvent.cpp
index 97f36b0b..622b6c9a 100644
--- a/src/libs/engine/events/UnregisterClientEvent.cpp
+++ b/src/libs/engine/events/UnregisterClientEvent.cpp
@@ -16,15 +16,14 @@
#include "UnregisterClientEvent.h"
#include "Responder.h"
-#include "Om.h"
-#include "OmApp.h"
+#include "Ingen.h"
#include "ClientBroadcaster.h"
#include "interface/ClientInterface.h"
namespace Om {
-UnregisterClientEvent::UnregisterClientEvent(CountedPtr<Responder> responder, samplecount timestamp, ClientKey key)
+UnregisterClientEvent::UnregisterClientEvent(CountedPtr<Responder> responder, SampleCount timestamp, ClientKey key)
: QueuedEvent(responder, timestamp)
, _key(key)
{
@@ -34,7 +33,7 @@ UnregisterClientEvent::UnregisterClientEvent(CountedPtr<Responder> responder, sa
void
UnregisterClientEvent::post_process()
{
- if (om->client_broadcaster()->unregister_client(_key))
+ if (Ingen::instance().client_broadcaster()->unregister_client(_key))
_responder->respond_ok();
else
_responder->respond_error("Unable to unregister client");
diff --git a/src/libs/engine/events/UnregisterClientEvent.h b/src/libs/engine/events/UnregisterClientEvent.h
index 41adcef1..634fe762 100644
--- a/src/libs/engine/events/UnregisterClientEvent.h
+++ b/src/libs/engine/events/UnregisterClientEvent.h
@@ -39,7 +39,7 @@ using Shared::ClientKey;
class UnregisterClientEvent : public QueuedEvent
{
public:
- UnregisterClientEvent(CountedPtr<Responder> responder, samplecount timestamp, ClientKey key);
+ UnregisterClientEvent(CountedPtr<Responder> responder, SampleCount timestamp, ClientKey key);
void post_process();