summaryrefslogtreecommitdiffstats
path: root/src/engine/PortImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/PortImpl.cpp')
-rw-r--r--src/engine/PortImpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index 5766e80f..6ee4c0e1 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -57,7 +57,7 @@ PortImpl::PortImpl(BufferFactory& bufs,
, _value(value)
, _broadcast(false)
, _set_by_user(false)
- , _last_broadcasted_value(_value.type() == Atom::FLOAT ? _value.get_float() : 0.0f) // default?
+ , _last_broadcasted_value(value)
, _context(Context::AUDIO)
, _buffers(new Array<BufferFactory::Ref>(poly))
, _prepared_buffers(NULL)
@@ -197,7 +197,7 @@ PortImpl::broadcast_value(Context& context, bool force)
break;
}
- if (val.type() == Atom::FLOAT && (force || val != _last_broadcasted_value)) {
+ if (val.is_valid() && (force || val != _last_broadcasted_value)) {
_last_broadcasted_value = val;
const Events::SendPortValue ev(context.engine(), context.start(), this, true, 0, val);
context.event_sink().write(sizeof(ev), &ev);