summaryrefslogtreecommitdiffstats
path: root/src/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-14 01:27:46 +0000
committerDavid Robillard <d@drobilla.net>2010-02-14 01:27:46 +0000
commit49dcb26a2133e5067a1e63b2a5633444c08bb85a (patch)
treeabf99ee05c65c581029e9139ec8de004f35c450d /src/engine/events
parent16cc07ce3c37ca663ec40c2dcea3302de69966b1 (diff)
downloadingen-49dcb26a2133e5067a1e63b2a5633444c08bb85a.tar.gz
ingen-49dcb26a2133e5067a1e63b2a5633444c08bb85a.tar.bz2
ingen-49dcb26a2133e5067a1e63b2a5633444c08bb85a.zip
Remove voice specific control setting.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2445 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r--src/engine/events/SendPortValue.cpp9
-rw-r--r--src/engine/events/SetPortValue.cpp48
-rw-r--r--src/engine/events/SetPortValue.hpp11
3 files changed, 8 insertions, 60 deletions
diff --git a/src/engine/events/SendPortValue.cpp b/src/engine/events/SendPortValue.cpp
index 1d7d400d..e6bf7ad9 100644
--- a/src/engine/events/SendPortValue.cpp
+++ b/src/engine/events/SendPortValue.cpp
@@ -31,12 +31,9 @@ namespace Events {
void
SendPortValue::post_process()
{
- if (_omni) {
- _engine.broadcaster()->set_property(_port->path(),
- _engine.world()->uris->ingen_value, _value);
- } else {
- _engine.broadcaster()->set_voice_value(_port->path(), _voice_num, _value);
- }
+ _engine.broadcaster()->set_property(
+ _port->path(),
+ _engine.world()->uris->ingen_value, _value);
}
diff --git a/src/engine/events/SetPortValue.cpp b/src/engine/events/SetPortValue.cpp
index 8f8f331e..a43a37aa 100644
--- a/src/engine/events/SetPortValue.cpp
+++ b/src/engine/events/SetPortValue.cpp
@@ -47,7 +47,6 @@ namespace Events {
using namespace Shared;
-/** Omni (all voices) control setting */
SetPortValue::SetPortValue(Engine& engine,
SharedPtr<Request> request,
bool queued,
@@ -56,8 +55,6 @@ SetPortValue::SetPortValue(Engine& engine,
const Raul::Atom& value)
: QueuedEvent(engine, request, timestamp)
, _queued(queued)
- , _omni(true)
- , _voice_num(0)
, _port_path(port_path)
, _value(value)
, _port(NULL)
@@ -66,25 +63,6 @@ SetPortValue::SetPortValue(Engine& engine,
}
-/** Voice-specific control setting */
-SetPortValue::SetPortValue(Engine& engine,
- SharedPtr<Request> request,
- bool queued,
- SampleCount timestamp,
- uint32_t voice_num,
- const Raul::Path& port_path,
- const Raul::Atom& value)
- : QueuedEvent(engine, request, timestamp)
- , _queued(queued)
- , _omni(false)
- , _voice_num(voice_num)
- , _port_path(port_path)
- , _value(value)
- , _port(NULL)
- , _error(NO_ERROR)
-{
-}
-
/** Internal */
SetPortValue::SetPortValue(Engine& engine,
SharedPtr<Request> request,
@@ -93,8 +71,6 @@ SetPortValue::SetPortValue(Engine& engine,
const Raul::Atom& value)
: QueuedEvent(engine, request, timestamp)
, _queued(false)
- , _omni(true)
- , _voice_num(0)
, _port_path(port->path())
, _value(value)
, _port(port)
@@ -170,16 +146,9 @@ SetPortValue::apply(Context& context)
return;
}
- if (_omni) {
- for (uint32_t v = 0; v < _port->poly(); ++v)
- ((AudioBuffer*)_port->buffer(v).get())->set_value(
- _value.get_float(), start, _time);
- } else {
- if (_voice_num < _port->poly())
- ((AudioBuffer*)_port->buffer(_voice_num).get())->set_value(
- _value.get_float(), start, _time);
- else
- _error = ILLEGAL_VOICE;
+ for (uint32_t v = 0; v < _port->poly(); ++v) {
+ ((AudioBuffer*)_port->buffer(v).get())->set_value(
+ _value.get_float(), start, _time);
}
return;
}
@@ -232,21 +201,14 @@ SetPortValue::post_process()
case NO_ERROR:
assert(_port != NULL);
_request->respond_ok();
- if (_omni)
- _engine.broadcaster()->set_property(_port_path,
- _engine.world()->uris->ingen_value, _value);
- else
- _engine.broadcaster()->set_voice_value(_port_path, _voice_num, _value);
+ _engine.broadcaster()->set_property(_port_path,
+ _engine.world()->uris->ingen_value, _value);
break;
case TYPE_MISMATCH:
ss << "Illegal value type " << _value.type()
<< " for port " << _port_path << endl;
_request->respond_error(ss.str());
break;
- case ILLEGAL_VOICE:
- ss << "Illegal voice number " << _voice_num;
- _request->respond_error(ss.str());
- break;
case PORT_NOT_FOUND:
msg = "Unable to find port ";
msg.append(_port_path.str()).append(" to set value");
diff --git a/src/engine/events/SetPortValue.hpp b/src/engine/events/SetPortValue.hpp
index d7a3d7ae..5d4265c7 100644
--- a/src/engine/events/SetPortValue.hpp
+++ b/src/engine/events/SetPortValue.hpp
@@ -50,14 +50,6 @@ public:
SetPortValue(Engine& engine,
SharedPtr<Request> request,
- bool queued,
- SampleCount timestamp,
- uint32_t voice_num,
- const Raul::Path& port_path,
- const Raul::Atom& value);
-
- SetPortValue(Engine& engine,
- SharedPtr<Request> request,
SampleCount timestamp,
PortImpl* port,
const Raul::Atom& value);
@@ -73,15 +65,12 @@ private:
NO_ERROR,
PORT_NOT_FOUND,
NO_SPACE,
- ILLEGAL_VOICE,
TYPE_MISMATCH
};
void apply(Context& context);
bool _queued;
- bool _omni;
- uint32_t _voice_num;
const Raul::Path _port_path;
const Raul::Atom _value;
PortImpl* _port;