diff options
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/CreatePatch.cpp | 2 | ||||
-rw-r--r-- | src/server/events/CreatePort.cpp | 1 | ||||
-rw-r--r-- | src/server/events/Delta.cpp | 9 | ||||
-rw-r--r-- | src/server/events/Get.cpp | 1 | ||||
-rw-r--r-- | src/server/events/SetPortValue.hpp | 5 |
5 files changed, 10 insertions, 8 deletions
diff --git a/src/server/events/CreatePatch.cpp b/src/server/events/CreatePatch.cpp index 476ccccb..b29ca667 100644 --- a/src/server/events/CreatePatch.cpp +++ b/src/server/events/CreatePatch.cpp @@ -69,7 +69,7 @@ CreatePatch::pre_process() int_poly = p->second.get_int32(); } - if (int_poly < 1) { + if (int_poly < 1 || int_poly > 128) { return Event::pre_process_done(INVALID_POLY, path); } diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index c62e858c..c156c13a 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -23,6 +23,7 @@ #include "raul/Path.hpp" #include "Broadcaster.hpp" +#include "BufferFactory.hpp" #include "CreatePort.hpp" #include "Driver.hpp" #include "DuplexPort.hpp" diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index b1408d7a..f5d5239a 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -206,8 +206,13 @@ Delta::pre_process() } } else if (key == uris.ingen_polyphony) { if (value.type() == uris.forge.Int) { - op = POLYPHONY; - _patch->prepare_internal_poly(*_engine.buffer_factory(), value.get_int32()); + if (value.get_int32() < 1 || value.get_int32() > 128) { + _status == INVALID_POLY; + } else { + op = POLYPHONY; + _patch->prepare_internal_poly( + *_engine.buffer_factory(), value.get_int32()); + } } else { _status = BAD_VALUE_TYPE; } diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index ae4174bb..8ffe9319 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -19,6 +19,7 @@ #include "ingen/Interface.hpp" #include "Broadcaster.hpp" +#include "BufferFactory.hpp" #include "Driver.hpp" #include "Engine.hpp" #include "EngineStore.hpp" diff --git a/src/server/events/SetPortValue.hpp b/src/server/events/SetPortValue.hpp index 93a4b528..a82553f5 100644 --- a/src/server/events/SetPortValue.hpp +++ b/src/server/events/SetPortValue.hpp @@ -32,11 +32,6 @@ namespace Events { /** An event to change the value of a port. * - * This event can either be queued or immediate, depending on the queued - * parameter passed to the constructor. It must be passed to the appropriate - * place (ie queued event passed to the event queue and non-queued event - * processed in the audio thread) or nasty things will happen. - * * \ingroup engine */ class SetPortValue : public Event |