From 9f1f6485c99e90831bbcebaa35831ff76b2204ed Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 20 Mar 2017 03:27:33 +0100 Subject: Always use sample accurate controls This changes control port buffers to always be sequences of float, splitting cycles internally so nodes with control ports act as if they support sample accurate control input and output. This allows things like having networks of control ports manipulated by the user which are run into CV ports and having sample accurate changes end up in the CV ports even though the values were calculated by plugins with single float ports. Further work is probably necessary to thin and smooth changes that come from a user drag (perhaps there should be a mode for this?) to keep the amount of cycle splitting reasonable, and support for plugins with fixed block length. --- src/server/events/SetPortValue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/events/SetPortValue.cpp') diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp index b8c23605..89c92580 100644 --- a/src/server/events/SetPortValue.cpp +++ b/src/server/events/SetPortValue.cpp @@ -56,7 +56,7 @@ SetPortValue::~SetPortValue() bool SetPortValue::pre_process(PreProcessContext& ctx) { - Ingen::URIs& uris = _engine.world()->uris(); + Ingen::URIs& uris = _engine.world()->uris(); if (_port->is_output()) { return Event::pre_process_done(Status::DIRECTION_MISMATCH, _port->path()); } @@ -72,7 +72,7 @@ SetPortValue::pre_process(PreProcessContext& ctx) if (_port->buffer_type() == uris.atom_Sequence) { _buffer = _engine.buffer_factory()->get_buffer( _port->buffer_type(), - 0, + _value.type() == uris.atom_Float ? _value.type() : 0, _engine.buffer_factory()->default_size(_port->buffer_type())); } -- cgit v1.2.1