summaryrefslogtreecommitdiffstats
path: root/src/engine/AudioBuffer.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-26 01:39:16 +0000
committerDavid Robillard <d@drobilla.net>2010-02-26 01:39:16 +0000
commit52e49500bb78974d43bdfd30b2ec9b2a4522dd25 (patch)
tree44a5a46e946c6b43b657ca5733a165943dd947ae /src/engine/AudioBuffer.cpp
parent3d6b047cd19baf9bf5a81b4fe16e1e9e53ed8fef (diff)
downloadingen-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/AudioBuffer.cpp')
-rw-r--r--src/engine/AudioBuffer.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/engine/AudioBuffer.cpp b/src/engine/AudioBuffer.cpp
index 145df559..e29fa5c4 100644
--- a/src/engine/AudioBuffer.cpp
+++ b/src/engine/AudioBuffer.cpp
@@ -194,32 +194,6 @@ AudioBuffer::copy(Context& context, const Buffer* src)
}
-/** Accumulate a block of @a src into buffer.
- *
- * @a start_sample and @a end_sample define the inclusive range to be accumulated.
- * This function only adds the same range in one buffer to another.
- */
-void
-AudioBuffer::accumulate(Context& context, const AudioBuffer* const src)
-{
- Sample* const buf = data();
- const Sample* const src_buf = src->data();
-
- const size_t frames = std::min(nframes(), src->nframes());
- assert(frames != 0);
-
- // Mix initial portions
- SampleCount i = 0;
- for (; i < frames; ++i)
- buf[i] += src_buf[i];
-
- // Extend/Mix the final sample of src if it is shorter
- const Sample last = src_buf[i - 1];
- while (i < nframes())
- buf[i++] += last;
-}
-
-
void
AudioBuffer::prepare_read(Context& context)
{