summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/AudioBuffer.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-08-02 07:23:56 +0000
committerDavid Robillard <d@drobilla.net>2007-08-02 07:23:56 +0000
commit191b78d09365112a868ddaf3f813ef2b5bc2c252 (patch)
tree48000d7f46c7b7102f1e8f013b72eccd41418abe /src/libs/engine/AudioBuffer.cpp
parenta8ea9db4af11208293543f50392127819c8007cd (diff)
downloadingen-191b78d09365112a868ddaf3f813ef2b5bc2c252.tar.gz
ingen-191b78d09365112a868ddaf3f813ef2b5bc2c252.tar.bz2
ingen-191b78d09365112a868ddaf3f813ef2b5bc2c252.zip
Implement MIDI copying, fixes MIDI patching from patch input -> patch output (fix ticket 70).
git-svn-id: http://svn.drobilla.net/lad/ingen@670 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/AudioBuffer.cpp')
-rw-r--r--src/libs/engine/AudioBuffer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/engine/AudioBuffer.cpp b/src/libs/engine/AudioBuffer.cpp
index f05048ad..53fe6bb8 100644
--- a/src/libs/engine/AudioBuffer.cpp
+++ b/src/libs/engine/AudioBuffer.cpp
@@ -182,16 +182,17 @@ AudioBuffer::scale(Sample val, size_t start_sample, size_t end_sample)
* This function only copies the same range in one buffer to another.
*/
void
-AudioBuffer::copy(const AudioBuffer* src, size_t start_sample, size_t end_sample)
+AudioBuffer::copy(const Buffer* src, size_t start_sample, size_t end_sample)
{
assert(end_sample >= start_sample);
assert(end_sample < _size);
assert(src);
+ assert(src->type() == DataType::FLOAT);
Sample* const buf = data();
assert(buf);
- const Sample* const src_buf = src->data();
+ const Sample* const src_buf = ((AudioBuffer*)src)->data();
assert(src_buf);
for (size_t i=start_sample; i <= end_sample; ++i)