diff options
author | David Robillard <d@drobilla.net> | 2007-10-13 20:35:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-13 20:35:29 +0000 |
commit | cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b (patch) | |
tree | caea057e24a2d498b8fc88a44867891e1ec3766c /src/libs/engine/PortImpl.hpp | |
parent | 4d440f54870cd3934a49bab1ae98fad3f13f00d4 (diff) | |
download | ingen-cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b.tar.gz ingen-cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b.tar.bz2 ingen-cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b.zip |
Fix sub-patch MIDI I/O.
Make buffer 'joining' (zero-copy connections) significantly less retarded.
git-svn-id: http://svn.drobilla.net/lad/ingen@882 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/PortImpl.hpp')
-rw-r--r-- | src/libs/engine/PortImpl.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libs/engine/PortImpl.hpp b/src/libs/engine/PortImpl.hpp index 93972f58..22e44c05 100644 --- a/src/libs/engine/PortImpl.hpp +++ b/src/libs/engine/PortImpl.hpp @@ -25,6 +25,7 @@ #include "types.hpp" #include "GraphObjectImpl.hpp" #include "interface/DataType.hpp" +#include "Buffer.hpp" namespace Raul { class Maid; } @@ -69,7 +70,15 @@ public: virtual Raul::Atom value() const; - Buffer* buffer(uint32_t voice) const { return _buffers->at(voice); } + inline Buffer* buffer(uint32_t voice) const { + Buffer* const buf = _buffers->at(voice); + if (buf->is_joined()) { + assert(buf->joined_buffer()); + return buf->joined_buffer(); + } else { + return buf; + } + } /** Called once per process cycle */ virtual void pre_process(ProcessContext& context) = 0; |