summaryrefslogtreecommitdiffstats
path: root/src/server/internals/Controller.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-31 04:34:18 +0000
committerDavid Robillard <d@drobilla.net>2012-07-31 04:34:18 +0000
commitd184de93fce861f4b632f410bde8d527ce1bf34f (patch)
tree9efa412f62028113381f66f8fe256d09fdeb6749 /src/server/internals/Controller.cpp
parent66ac730782803a47ae4977d2db2407126005f4bd (diff)
downloadingen-d184de93fce861f4b632f410bde8d527ce1bf34f.tar.gz
ingen-d184de93fce861f4b632f410bde8d527ce1bf34f.tar.bz2
ingen-d184de93fce861f4b632f410bde8d527ce1bf34f.zip
Move continuous value setting stuff from AudioBuffer to PortImpl.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4582 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/internals/Controller.cpp')
-rw-r--r--src/server/internals/Controller.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index 85f69442..571918fe 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -117,8 +117,7 @@ ControllerNode::control(ProcessContext& context, uint8_t control_num, uint8_t va
if (_learning) {
// FIXME: not thread safe
_param_port->set_value(context.engine().world()->forge().make(control_num));
- ((AudioBuffer*)_param_port->buffer(0).get())->set_value(
- (float)control_num, context.start(), context.end());
+ _param_port->set_control_value(context, time, control_num);
_param_port->broadcast_value(context, true);
_learning = false;
}
@@ -139,8 +138,9 @@ ControllerNode::control(ProcessContext& context, uint8_t control_num, uint8_t va
scaled_value = ((nval) * (max_port_val - min_port_val)) + min_port_val;
}
- if (control_num == ((AudioBuffer*)_param_port->buffer(0).get())->value_at(0))
- ((AudioBuffer*)_audio_port->buffer(0).get())->set_value(scaled_value, context.start(), time);
+ if (control_num == ((AudioBuffer*)_param_port->buffer(0).get())->value_at(0)) {
+ _audio_port->set_control_value(context, time, scaled_value);
+ }
}
} // namespace Internals