From 92600e0011488c66175dea483515daec560cd580 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Aug 2012 18:41:31 +0000 Subject: Considerable DSP performance improvements (mixing overhead, and per-event MIDI overhead with Note/Trigger nodes). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4657 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/CreatePatch.cpp | 2 +- src/server/events/CreatePort.cpp | 1 + src/server/events/Delta.cpp | 9 +++++++-- src/server/events/Get.cpp | 1 + src/server/events/SetPortValue.hpp | 5 ----- 5 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src/server/events') 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 @@ -31,11 +31,6 @@ class PortImpl; 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 */ -- cgit v1.2.1