summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/PortImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-21 17:47:49 +0000
committerDavid Robillard <d@drobilla.net>2007-10-21 17:47:49 +0000
commit89a9cdf0ab581a4cff5cf8fd859d714a90bb8998 (patch)
tree2a9cbe5ebda35de1bab8c5a34762e112e9a2c948 /src/libs/engine/PortImpl.cpp
parent22b17482a552b0966a80c19d94651385357d5701 (diff)
downloadingen-89a9cdf0ab581a4cff5cf8fd859d714a90bb8998.tar.gz
ingen-89a9cdf0ab581a4cff5cf8fd859d714a90bb8998.tar.bz2
ingen-89a9cdf0ab581a4cff5cf8fd859d714a90bb8998.zip
Fix control port value broadcasting.
git-svn-id: http://svn.drobilla.net/lad/ingen@893 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/PortImpl.cpp')
-rw-r--r--src/libs/engine/PortImpl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/engine/PortImpl.cpp b/src/libs/engine/PortImpl.cpp
index 4a17a218..ec27092a 100644
--- a/src/libs/engine/PortImpl.cpp
+++ b/src/libs/engine/PortImpl.cpp
@@ -173,20 +173,20 @@ void
PortImpl::broadcast(ProcessContext& context)
{
if (_broadcast) {
- if (_type == DataType::CONTROL) {
- const Sample value = ((AudioBuffer*)(*_buffers)[0])->value_at(0);
+ if (_type == DataType::CONTROL || _type == DataType::AUDIO) {
+ const Sample value = ((AudioBuffer*)buffer(0))->value_at(0);
if (value != _last_broadcasted_value) {
const SendPortValueEvent ev(context.engine(), context.start(), this, false, 0, value);
context.event_sink().write(sizeof(ev), &ev);
_last_broadcasted_value = value;
}
} else if (_type == DataType::MIDI) {
- if (((MidiBuffer*)(*_buffers)[0])->event_count() > 0) {
+ if (((MidiBuffer*)buffer(0))->event_count() > 0) {
const SendPortActivityEvent ev(context.engine(), context.start(), this);
context.event_sink().write(sizeof(ev), &ev);
}
} else if (_type == DataType::OSC) {
- if (((OSCBuffer*)(*_buffers)[0])->event_count() > 0) {
+ if (((OSCBuffer*)buffer(0))->event_count() > 0) {
const SendPortActivityEvent ev(context.engine(), context.start(), this);
context.event_sink().write(sizeof(ev), &ev);
}