From ffae1d83620f0f57977c95e5e04f456bf0324b8c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 25 Oct 2015 06:48:45 +0000 Subject: Fix audio=>control connections git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5784 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/Buffer.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp index d4aa37c4..dfa3c506 100644 --- a/src/server/Buffer.cpp +++ b/src/server/Buffer.cpp @@ -199,15 +199,19 @@ Buffer::port_data(PortType port_type, SampleCount offset) { switch (port_type.id()) { case PortType::ID::CONTROL: + case PortType::ID::CV: + case PortType::ID::AUDIO: if (_type == _factory.uris().atom_Float) { return &get()->body; + } else if (_type == _factory.uris().atom_Sound) { + return (Sample*)_buf; } break; - case PortType::ID::CV: - case PortType::ID::AUDIO: - return (Sample*)_buf; - default: - return _buf; + case PortType::ID::ATOM: + if (_type != _factory.uris().atom_Sound) { + return _buf; + } + default: break; } return NULL; } -- cgit v1.2.1