diff options
author | David Robillard <d@drobilla.net> | 2010-02-26 01:39:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-26 01:39:16 +0000 |
commit | 52e49500bb78974d43bdfd30b2ec9b2a4522dd25 (patch) | |
tree | 44a5a46e946c6b43b657ca5733a165943dd947ae /src/engine/PortImpl.cpp | |
parent | 3d6b047cd19baf9bf5a81b4fe16e1e9e53ed8fef (diff) | |
download | ingen-52e49500bb78974d43bdfd30b2ec9b2a4522dd25.tar.gz ingen-52e49500bb78974d43bdfd30b2ec9b2a4522dd25.tar.bz2 ingen-52e49500bb78974d43bdfd30b2ec9b2a4522dd25.zip |
Perform all mixing for an audio input in a single mix operation (instead of a two step polyphony mixdown (by connections) and connections mixdown (by ports)).
Speed up and inline AudioBuffer::accumulate, to speed up mix().
Remove local buffer from Connection (always mix into destination InputPort's buffers).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2494 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/PortImpl.cpp')
-rw-r--r-- | src/engine/PortImpl.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp index a1a20ba8..7abfb90d 100644 --- a/src/engine/PortImpl.cpp +++ b/src/engine/PortImpl.cpp @@ -127,13 +127,18 @@ PortImpl::prepare_poly(BufferFactory& bufs, uint32_t poly) if (!_prepared_buffers) _prepared_buffers = new Array<BufferFactory::Ref>(poly, *_buffers, NULL); - get_buffers(bufs, _prepared_buffers, poly); - assert(prepared_poly() == poly); - return true; } +void +PortImpl::prepare_poly_buffers(BufferFactory& bufs) +{ + if (_prepared_buffers) + get_buffers(bufs, _prepared_buffers, _prepared_buffers->size()); +} + + bool PortImpl::apply_poly(Maid& maid, uint32_t poly) { |