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/AddNodeEvent.cpp4
-rw-r--r--src/libs/engine/events/AddNodeEvent.hpp2
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp4
-rw-r--r--src/libs/engine/events/AddPortEvent.hpp2
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.cpp4
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.hpp2
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp4
-rw-r--r--src/libs/engine/events/ClearPatchEvent.hpp2
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp4
-rw-r--r--src/libs/engine/events/ConnectionEvent.hpp2
-rw-r--r--src/libs/engine/events/CreatePatchEvent.cpp4
-rw-r--r--src/libs/engine/events/CreatePatchEvent.hpp2
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.cpp4
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.hpp2
-rw-r--r--src/libs/engine/events/DSSIControlEvent.cpp4
-rw-r--r--src/libs/engine/events/DSSIControlEvent.hpp2
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.cpp4
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.hpp2
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.cpp4
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.hpp2
-rw-r--r--src/libs/engine/events/DeactivateEvent.cpp4
-rw-r--r--src/libs/engine/events/DeactivateEvent.hpp2
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp8
-rw-r--r--src/libs/engine/events/DestroyEvent.hpp2
-rw-r--r--src/libs/engine/events/DisablePatchEvent.cpp4
-rw-r--r--src/libs/engine/events/DisablePatchEvent.hpp2
-rw-r--r--src/libs/engine/events/DisablePortMonitoringEvent.cpp4
-rw-r--r--src/libs/engine/events/DisablePortMonitoringEvent.hpp2
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.cpp6
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.hpp2
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.cpp6
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.hpp2
-rw-r--r--src/libs/engine/events/DisconnectionEvent.cpp4
-rw-r--r--src/libs/engine/events/DisconnectionEvent.hpp2
-rw-r--r--src/libs/engine/events/EnablePatchEvent.cpp4
-rw-r--r--src/libs/engine/events/EnablePatchEvent.hpp2
-rw-r--r--src/libs/engine/events/EnablePortMonitoringEvent.cpp4
-rw-r--r--src/libs/engine/events/EnablePortMonitoringEvent.hpp2
-rw-r--r--src/libs/engine/events/Makefile.am6
-rw-r--r--src/libs/engine/events/MidiLearnEvent.cpp4
-rw-r--r--src/libs/engine/events/MidiLearnEvent.hpp2
-rw-r--r--src/libs/engine/events/NoteOffEvent.cpp11
-rw-r--r--src/libs/engine/events/NoteOffEvent.hpp2
-rw-r--r--src/libs/engine/events/NoteOnEvent.cpp11
-rw-r--r--src/libs/engine/events/NoteOnEvent.hpp2
-rw-r--r--src/libs/engine/events/RenameEvent.cpp4
-rw-r--r--src/libs/engine/events/RenameEvent.hpp2
-rw-r--r--src/libs/engine/events/RequestObjectEvent.cpp7
-rw-r--r--src/libs/engine/events/RequestObjectEvent.hpp2
-rw-r--r--src/libs/engine/events/RequestPluginEvent.cpp7
-rw-r--r--src/libs/engine/events/RequestPluginEvent.hpp2
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.cpp7
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.hpp2
-rw-r--r--src/libs/engine/events/SendPortValueEvent.cpp18
-rw-r--r--src/libs/engine/events/SendPortValueEvent.hpp5
-rw-r--r--src/libs/engine/events/SetMetadataEvent.cpp4
-rw-r--r--src/libs/engine/events/SetMetadataEvent.hpp2
-rw-r--r--src/libs/engine/events/SetPolyphonicEvent.cpp4
-rw-r--r--src/libs/engine/events/SetPolyphonicEvent.hpp2
-rw-r--r--src/libs/engine/events/SetPolyphonyEvent.cpp4
-rw-r--r--src/libs/engine/events/SetPolyphonyEvent.hpp2
-rw-r--r--src/libs/engine/events/SetPortValueEvent.cpp11
-rw-r--r--src/libs/engine/events/SetPortValueEvent.hpp2
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.cpp11
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.hpp2
65 files changed, 127 insertions, 133 deletions
diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp
index 8dbe5f3f..f121c50e 100644
--- a/src/libs/engine/events/AddNodeEvent.cpp
+++ b/src/libs/engine/events/AddNodeEvent.cpp
@@ -107,9 +107,9 @@ AddNodeEvent::pre_process()
void
-AddNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+AddNodeEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_node != NULL) {
if (_patch->compiled_patch() != NULL)
diff --git a/src/libs/engine/events/AddNodeEvent.hpp b/src/libs/engine/events/AddNodeEvent.hpp
index eaf48807..ebee44b4 100644
--- a/src/libs/engine/events/AddNodeEvent.hpp
+++ b/src/libs/engine/events/AddNodeEvent.hpp
@@ -59,7 +59,7 @@ public:
bool poly);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp
index d31c2169..6aeb7f0f 100644
--- a/src/libs/engine/events/AddPortEvent.cpp
+++ b/src/libs/engine/events/AddPortEvent.cpp
@@ -133,9 +133,9 @@ AddPortEvent::pre_process()
void
-AddPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+AddPortEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_patch_port) {
diff --git a/src/libs/engine/events/AddPortEvent.hpp b/src/libs/engine/events/AddPortEvent.hpp
index 8b40d370..f430d50c 100644
--- a/src/libs/engine/events/AddPortEvent.hpp
+++ b/src/libs/engine/events/AddPortEvent.hpp
@@ -45,7 +45,7 @@ public:
AddPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp
index 130fb794..f3491dac 100644
--- a/src/libs/engine/events/AllNotesOffEvent.cpp
+++ b/src/libs/engine/events/AllNotesOffEvent.cpp
@@ -43,9 +43,9 @@ AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responde
void
-AllNotesOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+AllNotesOffEvent::execute(ProcessContext& context)
{
- Event::execute(nframes, start, end);
+ Event::execute(context);
if (_patch == NULL && _patch_path != "")
_patch = _engine.object_store()->find_patch(_patch_path);
diff --git a/src/libs/engine/events/AllNotesOffEvent.hpp b/src/libs/engine/events/AllNotesOffEvent.hpp
index c9263a40..4c2a9309 100644
--- a/src/libs/engine/events/AllNotesOffEvent.hpp
+++ b/src/libs/engine/events/AllNotesOffEvent.hpp
@@ -37,7 +37,7 @@ public:
AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Patch* patch);
AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index aa72cd54..a4d5c8df 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -61,9 +61,9 @@ ClearPatchEvent::pre_process()
void
-ClearPatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+ClearPatchEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_patch != NULL) {
_patch->disable();
diff --git a/src/libs/engine/events/ClearPatchEvent.hpp b/src/libs/engine/events/ClearPatchEvent.hpp
index dbcad25b..b1174c04 100644
--- a/src/libs/engine/events/ClearPatchEvent.hpp
+++ b/src/libs/engine/events/ClearPatchEvent.hpp
@@ -39,7 +39,7 @@ public:
ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index 69bb2645..4953eb02 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -145,9 +145,9 @@ ConnectionEvent::pre_process()
void
-ConnectionEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+ConnectionEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_error == NO_ERROR) {
// These must be inserted here, since they're actually used by the audio thread
diff --git a/src/libs/engine/events/ConnectionEvent.hpp b/src/libs/engine/events/ConnectionEvent.hpp
index 202fef01..ed2318d8 100644
--- a/src/libs/engine/events/ConnectionEvent.hpp
+++ b/src/libs/engine/events/ConnectionEvent.hpp
@@ -52,7 +52,7 @@ public:
ConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp
index 365b1a02..288eaee3 100644
--- a/src/libs/engine/events/CreatePatchEvent.cpp
+++ b/src/libs/engine/events/CreatePatchEvent.cpp
@@ -89,9 +89,9 @@ CreatePatchEvent::pre_process()
void
-CreatePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+CreatePatchEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_patch != NULL) {
if (_parent == NULL) {
diff --git a/src/libs/engine/events/CreatePatchEvent.hpp b/src/libs/engine/events/CreatePatchEvent.hpp
index 1eb33ed4..933ce066 100644
--- a/src/libs/engine/events/CreatePatchEvent.hpp
+++ b/src/libs/engine/events/CreatePatchEvent.hpp
@@ -45,7 +45,7 @@ public:
CreatePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp
index 3c325f35..a1588bed 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.cpp
+++ b/src/libs/engine/events/DSSIConfigureEvent.cpp
@@ -50,9 +50,9 @@ DSSIConfigureEvent::pre_process()
void
-DSSIConfigureEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DSSIConfigureEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
// Nothing.
}
diff --git a/src/libs/engine/events/DSSIConfigureEvent.hpp b/src/libs/engine/events/DSSIConfigureEvent.hpp
index 1ef43b50..5960daf9 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.hpp
+++ b/src/libs/engine/events/DSSIConfigureEvent.hpp
@@ -34,7 +34,7 @@ public:
DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp
index f0c261b0..648ec05a 100644
--- a/src/libs/engine/events/DSSIControlEvent.cpp
+++ b/src/libs/engine/events/DSSIControlEvent.cpp
@@ -49,9 +49,9 @@ DSSIControlEvent::pre_process()
void
-DSSIControlEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DSSIControlEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_node != NULL)
_node->set_control(_port_num, _val);
diff --git a/src/libs/engine/events/DSSIControlEvent.hpp b/src/libs/engine/events/DSSIControlEvent.hpp
index 68314fd7..56fd05cf 100644
--- a/src/libs/engine/events/DSSIControlEvent.hpp
+++ b/src/libs/engine/events/DSSIControlEvent.hpp
@@ -36,7 +36,7 @@ public:
DSSIControlEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp
index 9e12255d..d791e484 100644
--- a/src/libs/engine/events/DSSIProgramEvent.cpp
+++ b/src/libs/engine/events/DSSIProgramEvent.cpp
@@ -52,9 +52,9 @@ DSSIProgramEvent::pre_process()
void
-DSSIProgramEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DSSIProgramEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_node != NULL)
_node->program(_bank, _program);
diff --git a/src/libs/engine/events/DSSIProgramEvent.hpp b/src/libs/engine/events/DSSIProgramEvent.hpp
index fa4760ce..b66dcb87 100644
--- a/src/libs/engine/events/DSSIProgramEvent.hpp
+++ b/src/libs/engine/events/DSSIProgramEvent.hpp
@@ -34,7 +34,7 @@ public:
DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp
index bfb8f8fc..807cedad 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.cpp
+++ b/src/libs/engine/events/DSSIUpdateEvent.cpp
@@ -55,9 +55,9 @@ DSSIUpdateEvent::pre_process()
void
-DSSIUpdateEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DSSIUpdateEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_node != NULL) {
_node->set_ui_url(_url);
diff --git a/src/libs/engine/events/DSSIUpdateEvent.hpp b/src/libs/engine/events/DSSIUpdateEvent.hpp
index 08c5a31a..16a2b50a 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.hpp
+++ b/src/libs/engine/events/DSSIUpdateEvent.hpp
@@ -40,7 +40,7 @@ public:
DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DeactivateEvent.cpp b/src/libs/engine/events/DeactivateEvent.cpp
index a7842a0d..a68419f0 100644
--- a/src/libs/engine/events/DeactivateEvent.cpp
+++ b/src/libs/engine/events/DeactivateEvent.cpp
@@ -36,9 +36,9 @@ DeactivateEvent::pre_process()
void
-DeactivateEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DeactivateEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
}
diff --git a/src/libs/engine/events/DeactivateEvent.hpp b/src/libs/engine/events/DeactivateEvent.hpp
index e0ee2ea8..5a6750ba 100644
--- a/src/libs/engine/events/DeactivateEvent.hpp
+++ b/src/libs/engine/events/DeactivateEvent.hpp
@@ -33,7 +33,7 @@ public:
DeactivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
};
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index ceb75816..a3d96ede 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -125,15 +125,15 @@ DestroyEvent::pre_process()
void
-DestroyEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DestroyEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_patch_node_listnode) {
assert(_node);
if (_disconnect_node_event)
- _disconnect_node_event->execute(nframes, start, end);
+ _disconnect_node_event->execute(context);
if (_node->parent_patch()->compiled_patch())
_engine.maid()->push(_node->parent_patch()->compiled_patch());
@@ -143,7 +143,7 @@ DestroyEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
assert(_port);
if (_disconnect_port_event)
- _disconnect_port_event->execute(nframes, start, end);
+ _disconnect_port_event->execute(context);
if (_port->parent_patch()->compiled_patch())
_engine.maid()->push(_port->parent_patch()->compiled_patch());
diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp
index 82024e90..5ab3b01f 100644
--- a/src/libs/engine/events/DestroyEvent.hpp
+++ b/src/libs/engine/events/DestroyEvent.hpp
@@ -55,7 +55,7 @@ public:
~DestroyEvent();
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp
index 146364d8..bc5219a6 100644
--- a/src/libs/engine/events/DisablePatchEvent.cpp
+++ b/src/libs/engine/events/DisablePatchEvent.cpp
@@ -45,9 +45,9 @@ DisablePatchEvent::pre_process()
void
-DisablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DisablePatchEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_patch != NULL)
_patch->disable();
diff --git a/src/libs/engine/events/DisablePatchEvent.hpp b/src/libs/engine/events/DisablePatchEvent.hpp
index 00cb5ce7..1a208246 100644
--- a/src/libs/engine/events/DisablePatchEvent.hpp
+++ b/src/libs/engine/events/DisablePatchEvent.hpp
@@ -38,7 +38,7 @@ public:
DisablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DisablePortMonitoringEvent.cpp b/src/libs/engine/events/DisablePortMonitoringEvent.cpp
index 334970ae..3b5950ee 100644
--- a/src/libs/engine/events/DisablePortMonitoringEvent.cpp
+++ b/src/libs/engine/events/DisablePortMonitoringEvent.cpp
@@ -51,9 +51,9 @@ DisablePortMonitoringEvent::pre_process()
void
-DisablePortMonitoringEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DisablePortMonitoringEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
#if 0
assert(_time >= start && _time <= end);
diff --git a/src/libs/engine/events/DisablePortMonitoringEvent.hpp b/src/libs/engine/events/DisablePortMonitoringEvent.hpp
index ed10c195..b2fac41b 100644
--- a/src/libs/engine/events/DisablePortMonitoringEvent.hpp
+++ b/src/libs/engine/events/DisablePortMonitoringEvent.hpp
@@ -44,7 +44,7 @@ public:
const std::string& port_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp
index 97dfc3d5..b1f76dd6 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.cpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.cpp
@@ -113,13 +113,13 @@ DisconnectNodeEvent::pre_process()
void
-DisconnectNodeEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DisconnectNodeEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_succeeded) {
for (Raul::List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
- (*i)->execute(nframes, start, end);
+ (*i)->execute(context);
}
}
diff --git a/src/libs/engine/events/DisconnectNodeEvent.hpp b/src/libs/engine/events/DisconnectNodeEvent.hpp
index 9ed7cb3a..616f321f 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.hpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.hpp
@@ -48,7 +48,7 @@ public:
~DisconnectNodeEvent();
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp
index 6aa5a265..5056877d 100644
--- a/src/libs/engine/events/DisconnectPortEvent.cpp
+++ b/src/libs/engine/events/DisconnectPortEvent.cpp
@@ -121,13 +121,13 @@ DisconnectPortEvent::pre_process()
void
-DisconnectPortEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DisconnectPortEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_succeeded) {
for (Raul::List<DisconnectionEvent*>::iterator i = _disconnection_events.begin(); i != _disconnection_events.end(); ++i)
- (*i)->execute(nframes, start, end);
+ (*i)->execute(context);
}
}
diff --git a/src/libs/engine/events/DisconnectPortEvent.hpp b/src/libs/engine/events/DisconnectPortEvent.hpp
index 8fa9e25b..a58dc612 100644
--- a/src/libs/engine/events/DisconnectPortEvent.hpp
+++ b/src/libs/engine/events/DisconnectPortEvent.hpp
@@ -49,7 +49,7 @@ public:
~DisconnectPortEvent();
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp
index 67c3b5fb..da91c147 100644
--- a/src/libs/engine/events/DisconnectionEvent.cpp
+++ b/src/libs/engine/events/DisconnectionEvent.cpp
@@ -152,9 +152,9 @@ DisconnectionEvent::pre_process()
void
-DisconnectionEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+DisconnectionEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_error == NO_ERROR) {
Raul::ListNode<Connection*>* const port_connection
diff --git a/src/libs/engine/events/DisconnectionEvent.hpp b/src/libs/engine/events/DisconnectionEvent.hpp
index 7109c645..cefcb17b 100644
--- a/src/libs/engine/events/DisconnectionEvent.hpp
+++ b/src/libs/engine/events/DisconnectionEvent.hpp
@@ -53,7 +53,7 @@ public:
DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp
index 46cc5cc6..d0d872bb 100644
--- a/src/libs/engine/events/EnablePatchEvent.cpp
+++ b/src/libs/engine/events/EnablePatchEvent.cpp
@@ -53,9 +53,9 @@ EnablePatchEvent::pre_process()
void
-EnablePatchEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+EnablePatchEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_patch != NULL) {
_patch->enable();
diff --git a/src/libs/engine/events/EnablePatchEvent.hpp b/src/libs/engine/events/EnablePatchEvent.hpp
index 2bacd17d..f0ba5714 100644
--- a/src/libs/engine/events/EnablePatchEvent.hpp
+++ b/src/libs/engine/events/EnablePatchEvent.hpp
@@ -42,7 +42,7 @@ public:
EnablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/EnablePortMonitoringEvent.cpp b/src/libs/engine/events/EnablePortMonitoringEvent.cpp
index 1e2d79c0..bad80041 100644
--- a/src/libs/engine/events/EnablePortMonitoringEvent.cpp
+++ b/src/libs/engine/events/EnablePortMonitoringEvent.cpp
@@ -51,9 +51,9 @@ EnablePortMonitoringEvent::pre_process()
void
-EnablePortMonitoringEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+EnablePortMonitoringEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
#if 0
assert(_time >= start && _time <= end);
diff --git a/src/libs/engine/events/EnablePortMonitoringEvent.hpp b/src/libs/engine/events/EnablePortMonitoringEvent.hpp
index 19e19336..9696e5ca 100644
--- a/src/libs/engine/events/EnablePortMonitoringEvent.hpp
+++ b/src/libs/engine/events/EnablePortMonitoringEvent.hpp
@@ -44,7 +44,7 @@ public:
const std::string& port_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/Makefile.am b/src/libs/engine/events/Makefile.am
index c9e88099..d6b671a3 100644
--- a/src/libs/engine/events/Makefile.am
+++ b/src/libs/engine/events/Makefile.am
@@ -64,10 +64,10 @@ EXTRA_DIST = \
SendPortValueEvent.hpp \
SetMetadataEvent.cpp \
SetMetadataEvent.hpp \
- SetPolyphonyEvent.hpp \
- SetPolyphonyEvent.cpp \
- SetPolyphonicEvent.hpp \
SetPolyphonicEvent.cpp \
+ SetPolyphonicEvent.hpp \
+ SetPolyphonyEvent.cpp \
+ SetPolyphonyEvent.hpp \
SetPortValueEvent.cpp \
SetPortValueEvent.hpp \
SetPortValueQueuedEvent.cpp \
diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp
index d0de3d39..66f0ae2f 100644
--- a/src/libs/engine/events/MidiLearnEvent.cpp
+++ b/src/libs/engine/events/MidiLearnEvent.cpp
@@ -59,9 +59,9 @@ MidiLearnEvent::pre_process()
void
-MidiLearnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+MidiLearnEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
// FIXME: this isn't very good at all.
if (_node != NULL && _node->plugin()->type() == Plugin::Internal
diff --git a/src/libs/engine/events/MidiLearnEvent.hpp b/src/libs/engine/events/MidiLearnEvent.hpp
index bbb0c9a5..18cbcb43 100644
--- a/src/libs/engine/events/MidiLearnEvent.hpp
+++ b/src/libs/engine/events/MidiLearnEvent.hpp
@@ -68,7 +68,7 @@ public:
MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp
index 4f683903..f560f250 100644
--- a/src/libs/engine/events/NoteOffEvent.cpp
+++ b/src/libs/engine/events/NoteOffEvent.cpp
@@ -23,6 +23,7 @@
#include "Plugin.hpp"
#include "MidiNoteNode.hpp"
#include "MidiTriggerNode.hpp"
+#include "ProcessContext.hpp"
namespace Ingen {
@@ -49,10 +50,10 @@ NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, Sampl
void
-NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+NoteOffEvent::execute(ProcessContext& context)
{
- Event::execute(nframes, start, end);
- assert(_time >= start && _time <= end);
+ Event::execute(context);
+ assert(_time >= context.start() && _time <= context.end());
if (_node == NULL && _node_path != "")
_node = _engine.object_store()->find_node(_node_path);
@@ -60,9 +61,9 @@ NoteOffEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
// FIXME: this isn't very good at all.
if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
if (_node->plugin()->plug_label() == "note_in")
- ((MidiNoteNode*)_node)->note_off(_note_num, _time, nframes, start, end);
+ ((MidiNoteNode*)_node)->note_off(_note_num, _time, context);
else if (_node->plugin()->plug_label() == "trigger_in")
- ((MidiTriggerNode*)_node)->note_off(_note_num, _time, nframes, start, end);
+ ((MidiTriggerNode*)_node)->note_off(_note_num, _time, context);
}
}
diff --git a/src/libs/engine/events/NoteOffEvent.hpp b/src/libs/engine/events/NoteOffEvent.hpp
index c9301f5b..1b7d118c 100644
--- a/src/libs/engine/events/NoteOffEvent.hpp
+++ b/src/libs/engine/events/NoteOffEvent.hpp
@@ -38,7 +38,7 @@ public:
NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num);
NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num);
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/NoteOnEvent.cpp b/src/libs/engine/events/NoteOnEvent.cpp
index 22e85972..316e293a 100644
--- a/src/libs/engine/events/NoteOnEvent.cpp
+++ b/src/libs/engine/events/NoteOnEvent.cpp
@@ -23,6 +23,7 @@
#include "MidiNoteNode.hpp"
#include "MidiTriggerNode.hpp"
#include "Plugin.hpp"
+#include "ProcessContext.hpp"
namespace Ingen {
@@ -57,10 +58,10 @@ NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleC
void
-NoteOnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+NoteOnEvent::execute(ProcessContext& context)
{
- Event::execute(nframes, start, end);
- assert(_time >= start && _time <= end);
+ Event::execute(context);
+ assert(_time >= context.start() && _time <= context.end());
// Lookup if neccessary
if (_is_osc_triggered)
@@ -69,9 +70,9 @@ NoteOnEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
// FIXME: this isn't very good at all.
if (_node != NULL && _node->plugin()->type() == Plugin::Internal) {
if (_node->plugin()->plug_label() == "note_in")
- ((MidiNoteNode*)_node)->note_on(_note_num, _velocity, _time, nframes, start, end);
+ ((MidiNoteNode*)_node)->note_on(_note_num, _velocity, _time, context);
else if (_node->plugin()->plug_label() == "trigger_in")
- ((MidiTriggerNode*)_node)->note_on(_note_num, _velocity, _time, nframes, start, end);
+ ((MidiTriggerNode*)_node)->note_on(_note_num, _velocity, _time, context);
}
}
diff --git a/src/libs/engine/events/NoteOnEvent.hpp b/src/libs/engine/events/NoteOnEvent.hpp
index 175623bf..a629023f 100644
--- a/src/libs/engine/events/NoteOnEvent.hpp
+++ b/src/libs/engine/events/NoteOnEvent.hpp
@@ -38,7 +38,7 @@ public:
NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity);
NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity);
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp
index a731314b..1ec3b0d1 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -93,10 +93,10 @@ RenameEvent::pre_process()
void
-RenameEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+RenameEvent::execute(ProcessContext& context)
{
//cout << "Executing rename event...";
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
}
diff --git a/src/libs/engine/events/RenameEvent.hpp b/src/libs/engine/events/RenameEvent.hpp
index da7d642a..ec3a0cec 100644
--- a/src/libs/engine/events/RenameEvent.hpp
+++ b/src/libs/engine/events/RenameEvent.hpp
@@ -49,7 +49,7 @@ public:
~RenameEvent();
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp
index 62651e63..4c875e45 100644
--- a/src/libs/engine/events/RequestObjectEvent.cpp
+++ b/src/libs/engine/events/RequestObjectEvent.cpp
@@ -26,6 +26,7 @@
#include "Node.hpp"
#include "Port.hpp"
#include "ObjectSender.hpp"
+#include "ProcessContext.hpp"
using std::string;
@@ -50,10 +51,10 @@ RequestObjectEvent::pre_process()
void
-RequestObjectEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+RequestObjectEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
- assert(_time >= start && _time <= end);
+ QueuedEvent::execute(context);
+ assert(_time >= context.start() && _time <= context.end());
}
diff --git a/src/libs/engine/events/RequestObjectEvent.hpp b/src/libs/engine/events/RequestObjectEvent.hpp
index 1997cabe..263ea627 100644
--- a/src/libs/engine/events/RequestObjectEvent.hpp
+++ b/src/libs/engine/events/RequestObjectEvent.hpp
@@ -41,7 +41,7 @@ public:
RequestObjectEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp
index 693a021a..af7a4754 100644
--- a/src/libs/engine/events/RequestPluginEvent.cpp
+++ b/src/libs/engine/events/RequestPluginEvent.cpp
@@ -25,6 +25,7 @@
#include "ClientBroadcaster.hpp"
#include "NodeFactory.hpp"
#include "Plugin.hpp"
+#include "ProcessContext.hpp"
using std::string;
@@ -49,10 +50,10 @@ RequestPluginEvent::pre_process()
void
-RequestPluginEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+RequestPluginEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
- assert(_time >= start && _time <= end);
+ QueuedEvent::execute(context);
+ assert(_time >= context.start() && _time <= context.end());
}
diff --git a/src/libs/engine/events/RequestPluginEvent.hpp b/src/libs/engine/events/RequestPluginEvent.hpp
index 978aa5ff..a4c6cd09 100644
--- a/src/libs/engine/events/RequestPluginEvent.hpp
+++ b/src/libs/engine/events/RequestPluginEvent.hpp
@@ -41,7 +41,7 @@ public:
RequestPluginEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& uri);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp
index 992c1615..224c3045 100644
--- a/src/libs/engine/events/RequestPortValueEvent.cpp
+++ b/src/libs/engine/events/RequestPortValueEvent.cpp
@@ -24,6 +24,7 @@
#include "ObjectStore.hpp"
#include "ClientBroadcaster.hpp"
#include "AudioBuffer.hpp"
+#include "ProcessContext.hpp"
using std::string;
@@ -49,10 +50,10 @@ RequestPortValueEvent::pre_process()
void
-RequestPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+RequestPortValueEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
- assert(_time >= start && _time <= end);
+ QueuedEvent::execute(context);
+ assert(_time >= context.start() && _time <= context.end());
if (_port != NULL && _port->type() == DataType::FLOAT)
_value = ((AudioBuffer*)_port->buffer(0))->value_at(0/*_time - start*/);
diff --git a/src/libs/engine/events/RequestPortValueEvent.hpp b/src/libs/engine/events/RequestPortValueEvent.hpp
index f7170153..d3bccfdc 100644
--- a/src/libs/engine/events/RequestPortValueEvent.hpp
+++ b/src/libs/engine/events/RequestPortValueEvent.hpp
@@ -41,7 +41,7 @@ public:
RequestPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/SendPortValueEvent.cpp b/src/libs/engine/events/SendPortValueEvent.cpp
index d537011d..91bbb64e 100644
--- a/src/libs/engine/events/SendPortValueEvent.cpp
+++ b/src/libs/engine/events/SendPortValueEvent.cpp
@@ -30,28 +30,16 @@ using namespace std;
namespace Ingen {
-
-SendPortValueEvent(Engine& engine,
- SampleCount timestamp,
- Port* port,
- bool omni,
- uint32_t voice_num,
- float value)
- : _port(port)
- , _omni(omni)
- , _voice_num(voice_num)
- , _value(value)
-{
-}
-
+class Engine;
void
SendPortValueEvent::post_process()
{
+ // FIXME...
+
if (_omni) {
_engine.broadcaster()->send_control_change(_port->path(), _value);
} else {
- cerr << "NON-OMNI CONTROL CHANGE WHAT?" << endl;
_engine.broadcaster()->send_control_change(_port->path(), _value);
}
}
diff --git a/src/libs/engine/events/SendPortValueEvent.hpp b/src/libs/engine/events/SendPortValueEvent.hpp
index d63d43b0..e80682d0 100644
--- a/src/libs/engine/events/SendPortValueEvent.hpp
+++ b/src/libs/engine/events/SendPortValueEvent.hpp
@@ -43,15 +43,14 @@ class Port;
class SendPortValueEvent : public Event
{
public:
- SendPortValueEvent() {}
-
inline SendPortValueEvent(Engine& engine,
SampleCount timestamp,
Port* port,
bool omni,
uint32_t voice_num,
Sample value)
- : _port(port)
+ : Event(engine, SharedPtr<Responder>(), timestamp)
+ , _port(port)
, _omni(omni)
, _voice_num(voice_num)
, _value(value)
diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp
index 8e848aa6..8e9163f0 100644
--- a/src/libs/engine/events/SetMetadataEvent.cpp
+++ b/src/libs/engine/events/SetMetadataEvent.cpp
@@ -54,9 +54,9 @@ SetMetadataEvent::pre_process()
void
-SetMetadataEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+SetMetadataEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
// Do nothing
}
diff --git a/src/libs/engine/events/SetMetadataEvent.hpp b/src/libs/engine/events/SetMetadataEvent.hpp
index 51af36f7..363a63eb 100644
--- a/src/libs/engine/events/SetMetadataEvent.hpp
+++ b/src/libs/engine/events/SetMetadataEvent.hpp
@@ -39,7 +39,7 @@ public:
SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Raul::Atom& value);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/SetPolyphonicEvent.cpp b/src/libs/engine/events/SetPolyphonicEvent.cpp
index 17313f96..bce9a1b2 100644
--- a/src/libs/engine/events/SetPolyphonicEvent.cpp
+++ b/src/libs/engine/events/SetPolyphonicEvent.cpp
@@ -50,9 +50,9 @@ SetPolyphonicEvent::pre_process()
void
-SetPolyphonicEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+SetPolyphonicEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_object)
_object->set_polyphonic(*_engine.maid(), _poly);
diff --git a/src/libs/engine/events/SetPolyphonicEvent.hpp b/src/libs/engine/events/SetPolyphonicEvent.hpp
index 3e3aa81e..4d0084c9 100644
--- a/src/libs/engine/events/SetPolyphonicEvent.hpp
+++ b/src/libs/engine/events/SetPolyphonicEvent.hpp
@@ -39,7 +39,7 @@ public:
SetPolyphonicEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool poly);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/SetPolyphonyEvent.cpp b/src/libs/engine/events/SetPolyphonyEvent.cpp
index bdf4e1a1..7a261b5e 100644
--- a/src/libs/engine/events/SetPolyphonyEvent.cpp
+++ b/src/libs/engine/events/SetPolyphonyEvent.cpp
@@ -52,9 +52,9 @@ SetPolyphonyEvent::pre_process()
void
-SetPolyphonyEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+SetPolyphonyEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
+ QueuedEvent::execute(context);
if (_patch)
_patch->apply_internal_poly(*_engine.maid(), _poly);
diff --git a/src/libs/engine/events/SetPolyphonyEvent.hpp b/src/libs/engine/events/SetPolyphonyEvent.hpp
index 923c8f60..a2ac1862 100644
--- a/src/libs/engine/events/SetPolyphonyEvent.hpp
+++ b/src/libs/engine/events/SetPolyphonyEvent.hpp
@@ -39,7 +39,7 @@ public:
SetPolyphonyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path, uint32_t poly);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp
index c1f3c890..b0fc273e 100644
--- a/src/libs/engine/events/SetPortValueEvent.cpp
+++ b/src/libs/engine/events/SetPortValueEvent.cpp
@@ -25,6 +25,7 @@
#include "ObjectStore.hpp"
#include "AudioBuffer.hpp"
#include "MidiBuffer.hpp"
+#include "ProcessContext.hpp"
using namespace std;
@@ -79,10 +80,10 @@ SetPortValueEvent::~SetPortValueEvent()
void
-SetPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+SetPortValueEvent::execute(ProcessContext& context)
{
- Event::execute(nframes, start, end);
- assert(_time >= start && _time <= end);
+ Event::execute(context);
+ assert(_time >= context.start() && _time <= context.end());
if (_port == NULL)
_port = _engine.object_store()->find_port(_port_path);
@@ -95,7 +96,7 @@ SetPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
Buffer* const buf = _port->buffer(0);
AudioBuffer* const abuf = dynamic_cast<AudioBuffer*>(buf);
if (abuf) {
- const uint32_t offset = (buf->size() == 1) ? 0 : _time - start;
+ const uint32_t offset = (buf->size() == 1) ? 0 : _time - context.start();
if (_omni)
for (uint32_t i=0; i < _port->poly(); ++i)
@@ -108,7 +109,7 @@ SetPortValueEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
MidiBuffer* const mbuf = dynamic_cast<MidiBuffer*>(buf);
if (mbuf) {
- const double stamp = std::max((double)(_time - start), mbuf->latest_stamp());
+ const double stamp = std::max((double)(_time - context.start()), mbuf->latest_stamp());
mbuf->append(stamp, _data_size, (const unsigned char*)_data);
}
}
diff --git a/src/libs/engine/events/SetPortValueEvent.hpp b/src/libs/engine/events/SetPortValueEvent.hpp
index 4b6e8d92..0761ed39 100644
--- a/src/libs/engine/events/SetPortValueEvent.hpp
+++ b/src/libs/engine/events/SetPortValueEvent.hpp
@@ -52,7 +52,7 @@ public:
~SetPortValueEvent();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private:
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
index d0bfff4a..00de1cce 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
@@ -26,6 +26,7 @@
#include "ObjectStore.hpp"
#include "AudioBuffer.hpp"
#include "MidiBuffer.hpp"
+#include "ProcessContext.hpp"
namespace Ingen {
@@ -88,10 +89,10 @@ SetPortValueQueuedEvent::pre_process()
void
-SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
+SetPortValueQueuedEvent::execute(ProcessContext& context)
{
- QueuedEvent::execute(nframes, start, end);
- assert(_time >= start && _time <= end);
+ QueuedEvent::execute(context);
+ assert(_time >= context.start() && _time <= context.end());
if (_error == NO_ERROR) {
assert(_port);
@@ -99,7 +100,7 @@ SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime
Buffer* const buf = _port->buffer(0);
AudioBuffer* const abuf = dynamic_cast<AudioBuffer*>(buf);
if (abuf) {
- const uint32_t offset = (buf->size() == 1) ? 0 : _time - start;
+ const uint32_t offset = (buf->size() == 1) ? 0 : _time - context.start();
if (_omni)
for (uint32_t i=0; i < _port->poly(); ++i)
@@ -112,7 +113,7 @@ SetPortValueQueuedEvent::execute(SampleCount nframes, FrameTime start, FrameTime
MidiBuffer* const mbuf = dynamic_cast<MidiBuffer*>(buf);
if (mbuf) {
- const double stamp = std::max((double)(_time - start), mbuf->latest_stamp());
+ const double stamp = std::max((double)(_time - context.start()), mbuf->latest_stamp());
mbuf->append(stamp, _data_size, (const unsigned char*)_data);
}
}
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.hpp b/src/libs/engine/events/SetPortValueQueuedEvent.hpp
index b64cf903..c6a3c0ee 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.hpp
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.hpp
@@ -51,7 +51,7 @@ public:
const void* data);
void pre_process();
- void execute(SampleCount nframes, FrameTime start, FrameTime end);
+ void execute(ProcessContext& context);
void post_process();
private: