summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-05 22:37:01 +0000
committerDavid Robillard <d@drobilla.net>2015-02-05 22:37:01 +0000
commit8fb76ad09c062055170666de28661bd9da25f98e (patch)
tree8eda59c84dedca9ebc27f1a9a058244247074756
parent766a104c91dfb6cdf58b0d8c80ab97b513b9c7b1 (diff)
downloadingen-8fb76ad09c062055170666de28661bd9da25f98e.tar.gz
ingen-8fb76ad09c062055170666de28661bd9da25f98e.tar.bz2
ingen-8fb76ad09c062055170666de28661bd9da25f98e.zip
Fix events at end of cycle.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5531 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/server/PortImpl.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index a86061c0..2dafcf32 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -243,10 +243,14 @@ PortImpl::set_voice_value(const Context& context,
} break;
case PortType::ATOM:
if (buffer(voice)->is_sequence()) {
- buffer(voice)->append_event(time - context.start(),
- sizeof(value),
- _bufs.uris().atom_Float,
- (const uint8_t*)&value);
+ const FrameTime offset = time - context.start();
+ // Same deal as above
+ if (offset < context.nframes()) {
+ buffer(voice)->append_event(time - context.start(),
+ sizeof(value),
+ _bufs.uris().atom_Float,
+ (const uint8_t*)&value);
+ }
_voices->at(voice).set_state.set(context, time, value);
} else {
fprintf(stderr,