summaryrefslogtreecommitdiffstats
path: root/src/engine/ObjectSender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/ObjectSender.cpp')
-rw-r--r--src/engine/ObjectSender.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/engine/ObjectSender.cpp b/src/engine/ObjectSender.cpp
index adb35f13..0055dff1 100644
--- a/src/engine/ObjectSender.cpp
+++ b/src/engine/ObjectSender.cpp
@@ -141,11 +141,8 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund
client->put(port->path(), port->properties());
// Send control value
- if (port->type() == PortType::CONTROL) {
- //const Sample& value = PtrCast<const AudioBuffer>(port->buffer(0))->value_at(0);
- const Sample& value = ((const AudioBuffer*)port->buffer(0).get())->value_at(0);
- client->set_property(port->path(), map.ingen_value, value);
- }
+ if (port->is_a(PortType::CONTROL))
+ client->set_property(port->path(), map.ingen_value, port->value());
if (bundle)
client->bundle_end();