diff options
-rw-r--r-- | src/server/LV2Block.cpp | 3 | ||||
-rw-r--r-- | src/server/PortImpl.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp index deafdcfe..4369107e 100644 --- a/src/server/LV2Block.cpp +++ b/src/server/LV2Block.cpp @@ -351,7 +351,8 @@ LV2Block::instantiate(BufferFactory& bufs) break; } - if (!val.type()) { + if (!val.type() && (port_type != PortType::ATOM)) { + // Ensure numeric ports have a value, use 0 by default val = forge.make(isnan(def_values[j]) ? 0.0f : def_values[j]); } diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index ade8c74a..a86061c0 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -266,6 +266,7 @@ PortImpl::update_set_state(Context& context, uint32_t voice) case SetState::State::SET: if (state.time < context.start() && buffer(voice)->is_sequence() && + buffer(voice)->value_type() == _bufs.uris().atom_Float && !_parent->path().is_root()) { buffer(voice)->clear(); state.time = context.start(); |