summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/SetPolyphonicEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-19 23:54:39 +0000
committerDavid Robillard <d@drobilla.net>2007-09-19 23:54:39 +0000
commitad558bdafde7e40b5de79b47d8586aec53cf3f7e (patch)
treea4431ddd696eb66eceb3119a9f7da933f3585ea4 /src/libs/engine/events/SetPolyphonicEvent.cpp
parent0b8415c61e321d032d62b5b1cbda65bab6f178d7 (diff)
downloadingen-ad558bdafde7e40b5de79b47d8586aec53cf3f7e.tar.gz
ingen-ad558bdafde7e40b5de79b47d8586aec53cf3f7e.tar.bz2
ingen-ad558bdafde7e40b5de79b47d8586aec53cf3f7e.zip
Toggling of individual node polyphonic state.
git-svn-id: http://svn.drobilla.net/lad/ingen@733 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/SetPolyphonicEvent.cpp')
-rw-r--r--src/libs/engine/events/SetPolyphonicEvent.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/libs/engine/events/SetPolyphonicEvent.cpp b/src/libs/engine/events/SetPolyphonicEvent.cpp
index 369abbd2..17313f96 100644
--- a/src/libs/engine/events/SetPolyphonicEvent.cpp
+++ b/src/libs/engine/events/SetPolyphonicEvent.cpp
@@ -31,10 +31,10 @@
namespace Ingen {
-SetPolyphonicEvent::SetPolyphonicEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path, bool poly)
+SetPolyphonicEvent::SetPolyphonicEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool poly)
: QueuedEvent(engine, responder, time, true, source),
- _patch_path(patch_path),
- _patch(NULL),
+ _path(path),
+ _object(NULL),
_poly(poly)
{
}
@@ -43,12 +43,9 @@ SetPolyphonicEvent::SetPolyphonicEvent(Engine& engine, SharedPtr<Responder> resp
void
SetPolyphonicEvent::pre_process()
{
- /*
- _patch = _engine.object_store()->find_patch(_patch_path);
- if (_patch && _poly > _patch->internal_poly())
- _patch->prepare_internal_poly(_poly);
-*/
- QueuedEvent::pre_process();
+ _object = _engine.object_store()->find_object(_path);
+
+ QueuedEvent::pre_process();
}
@@ -56,10 +53,10 @@ void
SetPolyphonicEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
{
QueuedEvent::execute(nframes, start, end);
-/*
- if (_patch)
- _patch->apply_internal_poly(*_engine.maid(), _poly);
-*/
+
+ if (_object)
+ _object->set_polyphonic(*_engine.maid(), _poly);
+
_source->unblock();
}
@@ -67,12 +64,12 @@ SetPolyphonicEvent::execute(SampleCount nframes, FrameTime start, FrameTime end)
void
SetPolyphonicEvent::post_process()
{
- /*
- if (_patch)
+ if (_object) {
_responder->respond_ok();
- else
- _responder->respond_error("Unable to find patch");
- */
+ _engine.broadcaster()->send_polyphonic(_path, _poly);
+ } else {
+ _responder->respond_error("Unable to find object");
+ }
}