summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Delta.cpp2
-rw-r--r--src/server/events/Disconnect.cpp3
-rw-r--r--src/server/events/SetPortValue.cpp8
3 files changed, 5 insertions, 8 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 6892ccbc..b1408d7a 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -38,7 +38,7 @@
#define LOG(s) s << "[Delta] "
// #define DUMP 1
-// #include "ingen/URIMap.hpp"
+#include "ingen/URIMap.hpp"
namespace Ingen {
namespace Server {
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index e797c6a7..413ded5f 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -101,7 +101,8 @@ Disconnect::Impl::Impl(Engine& e,
const float value = is_control ? _dst_input_port->value().get_float() : 0;
for (uint32_t i = 0; i < _buffers->size(); ++i) {
if (is_control) {
- PtrCast<AudioBuffer>(_buffers->at(i))->set_value(value, 0, 0);
+ AudioBuffer* abuf = dynamic_cast<AudioBuffer*>(_buffers->at(i).get());
+ abuf->set_block(value, 0, abuf->nframes() - 1);
} else {
_buffers->at(i)->clear();
}
diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp
index 52d17c32..f2fa48f3 100644
--- a/src/server/events/SetPortValue.cpp
+++ b/src/server/events/SetPortValue.cpp
@@ -99,17 +99,13 @@ SetPortValue::apply(Context& context)
Ingen::URIs& uris = _engine.world()->uris();
Buffer* const buf = _port->buffer(0).get();
- AudioBuffer* const abuf = dynamic_cast<AudioBuffer*>(buf);
- if (abuf) {
+ if (buf->type() == uris.atom_Sound || buf->type() == uris.atom_Float) {
if (_value.type() != uris.forge.Float) {
_status = TYPE_MISMATCH;
return;
}
- for (uint32_t v = 0; v < _port->poly(); ++v) {
- ((AudioBuffer*)_port->buffer(v).get())->set_value(
- _value.get_float(), context.start(), _time);
- }
+ _port->set_control_value(context, _time, _value.get_float());
} else if (buf->type() == uris.atom_Sequence) {
buf->prepare_write(context); // FIXME: incorrect
if (buf->append_event(_time - context.start(),