summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-09 20:29:05 +0000
committerDavid Robillard <d@drobilla.net>2011-10-09 20:29:05 +0000
commitca12acb6cb9b1f7618b88f2c95efd8ab275e1f57 (patch)
treea28782c7b6283578bd338e2c3a7e4afd21b8bff9 /src
parent59d6a7095c79a84475b95cb4121d9e3845806d16 (diff)
downloadingen-ca12acb6cb9b1f7618b88f2c95efd8ab275e1f57.tar.gz
ingen-ca12acb6cb9b1f7618b88f2c95efd8ab275e1f57.tar.bz2
ingen-ca12acb6cb9b1f7618b88f2c95efd8ab275e1f57.zip
Attempted blind fix for #778.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3538 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/PostProcessor.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp
index 3cd05992..d9195027 100644
--- a/src/server/PostProcessor.cpp
+++ b/src/server/PostProcessor.cpp
@@ -73,11 +73,13 @@ PostProcessor::process()
/* Process audio thread generated events */
Driver* driver = _engine.driver();
if (driver) {
- Notification note;
- const uint32_t read_space = driver->context().event_sink().read_space();
+ Raul::RingBuffer& event_sink = driver->context().event_sink();
+ const uint32_t read_space = event_sink.read_space();
+ Notification note;
for (uint32_t i = 0; i < read_space; i += sizeof(note)) {
- driver->context().event_sink().read(sizeof(note), &note);
- Notification::post_process(note, _engine);
+ if (event_sink.read(sizeof(note), &note) == sizeof(note)) {
+ Notification::post_process(note, _engine);
+ }
}
}