diff options
author | David Robillard <d@drobilla.net> | 2010-02-17 19:40:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-17 19:40:36 +0000 |
commit | 8aacf1bd969d4aa8bdcc309b11eeface31fe9878 (patch) | |
tree | 98684f9ac7b55c0275b195e9d250f694f3fa3460 /src/engine/events | |
parent | 35369ade66f8410e828316a34de539a3c235c79d (diff) | |
download | ingen-8aacf1bd969d4aa8bdcc309b11eeface31fe9878.tar.gz ingen-8aacf1bd969d4aa8bdcc309b11eeface31fe9878.tar.bz2 ingen-8aacf1bd969d4aa8bdcc309b11eeface31fe9878.zip |
Fix crash when rapidly decreasing polyphony (make SetMetadataEvent blocking if polyphony is changed).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2461 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r-- | src/engine/events/SetMetadata.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/engine/events/SetMetadata.cpp b/src/engine/events/SetMetadata.cpp index 5e289928..8095a03c 100644 --- a/src/engine/events/SetMetadata.cpp +++ b/src/engine/events/SetMetadata.cpp @@ -216,6 +216,7 @@ SetMetadata::pre_process() } else if (key == uris.ingen_polyphony) { if (value.type() == Atom::INT) { op = POLYPHONY; + _blocking = true; _patch->prepare_internal_poly(*_engine.buffer_factory(), value.get_int32()); } else { _error = BAD_VALUE_TYPE; @@ -314,6 +315,9 @@ SetMetadata::execute(ProcessContext& context) _object->remove_property(p->first, p->second); QueuedEvent::execute(context); + + if (_blocking) + _request->unblock(); } |