summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/AudioBuffer.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-07-29 06:21:29 +0000
committerDavid Robillard <d@drobilla.net>2008-07-29 06:21:29 +0000
commit1bcac68c24eeca5fba730a9dc48ac09eee9ac76b (patch)
tree4db45b2f7ead16227906ec6fcb8999cefb87b32e /src/libs/engine/AudioBuffer.cpp
parentf0e920ab170569fc9eaf5858af2e9ae3e8d44993 (diff)
downloadingen-1bcac68c24eeca5fba730a9dc48ac09eee9ac76b.tar.gz
ingen-1bcac68c24eeca5fba730a9dc48ac09eee9ac76b.tar.bz2
ingen-1bcac68c24eeca5fba730a9dc48ac09eee9ac76b.zip
Add converted Smack 909 patches.
Fix MIDI/Event ports loaded from patches. git-svn-id: http://svn.drobilla.net/lad/ingen@1303 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/AudioBuffer.cpp')
-rw-r--r--src/libs/engine/AudioBuffer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/engine/AudioBuffer.cpp b/src/libs/engine/AudioBuffer.cpp
index b874d527..5eea7103 100644
--- a/src/libs/engine/AudioBuffer.cpp
+++ b/src/libs/engine/AudioBuffer.cpp
@@ -129,8 +129,11 @@ AudioBuffer::clear()
void
AudioBuffer::set_value(Sample val, FrameTime cycle_start, FrameTime time)
{
+ if (_size == 1)
+ time = cycle_start;
+
FrameTime offset = time - cycle_start;
- assert(offset < _size);
+ assert(offset <= _size);
set_block(val, offset, _size - 1);