summaryrefslogtreecommitdiffstats
path: root/src/engine
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
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')
-rw-r--r--src/engine/ClientBroadcaster.hpp7
-rw-r--r--src/engine/HTTPClientSender.cpp7
-rw-r--r--src/engine/HTTPClientSender.hpp4
-rw-r--r--src/engine/OSCClientSender.cpp18
-rw-r--r--src/engine/OSCClientSender.hpp4
-rw-r--r--src/engine/QueuedEngineInterface.cpp9
-rw-r--r--src/engine/QueuedEngineInterface.hpp4
-rw-r--r--src/engine/events/SendPortValue.cpp9
-rw-r--r--src/engine/events/SetPortValue.cpp48
-rw-r--r--src/engine/events/SetPortValue.hpp11
10 files changed, 8 insertions, 113 deletions
diff --git a/src/engine/ClientBroadcaster.hpp b/src/engine/ClientBroadcaster.hpp
index 38073dc1..c72fef74 100644
--- a/src/engine/ClientBroadcaster.hpp
+++ b/src/engine/ClientBroadcaster.hpp
@@ -105,13 +105,6 @@ public:
BROADCAST(set_property, subject, predicate, value);
}
- void set_voice_value(const Raul::Path& port_path,
- uint32_t voice,
- const Raul::Atom& value) {
- BROADCAST(set_voice_value, port_path, voice, value);
- }
-
-
// ClientInterface
Raul::URI uri() const { return "http://drobilla.net/ns/ingen#broadcaster"; } ///< N/A
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index 996aa7cd..20bc8ee2 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -125,13 +125,6 @@ HTTPClientSender::set_property(const URI& subject, const URI& key, const Atom& v
void
-HTTPClientSender::set_voice_value(const Path& port_path, uint32_t voice, const Atom& value)
-{
- warn << "TODO: HTTP set voice value" << endl;
-}
-
-
-void
HTTPClientSender::activity(const Path& path)
{
const string msg = string(
diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp
index dc4b9edf..c34decad 100644
--- a/src/engine/HTTPClientSender.hpp
+++ b/src/engine/HTTPClientSender.hpp
@@ -88,10 +88,6 @@ public:
const Raul::URI& predicate,
const Raul::Atom& value);
- virtual void set_voice_value(const Raul::Path& port_path,
- uint32_t voice,
- const Raul::Atom& value);
-
virtual void activity(const Raul::Path& path);
private:
diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp
index c0f8e039..eec3923a 100644
--- a/src/engine/OSCClientSender.cpp
+++ b/src/engine/OSCClientSender.cpp
@@ -205,24 +205,6 @@ OSCClientSender::set_property(const URI& path, const URI& key, const Atom& value
/** \page client_osc_namespace
- * <h2>/set_port_value</h2>
- * \arg \b path (string) - Path of port
- * \arg \b voice (int) - Voice which is set to this value
- * \arg \b value (any) - New value of port
- *
- * Notification the value of a port has changed.
- */
-void
-OSCClientSender::set_voice_value(const Path& port_path, uint32_t voice, const Atom& value)
-{
- lo_message m = lo_message_new();
- lo_message_add_string(m, port_path.c_str());
- AtomLiblo::lo_message_add_atom(m, value);
- send_message("/set_port_value", m);
-}
-
-
-/** \page client_osc_namespace
* <h2>/activity</h2>
* \arg \b path (string) - Path of object
*
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index ca0783b0..fa6f1795 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -88,10 +88,6 @@ public:
const Raul::URI& predicate,
const Raul::Atom& value);
- virtual void set_voice_value(const Raul::Path& port_path,
- uint32_t voice,
- const Raul::Atom& value);
-
virtual void activity(const Raul::Path& path);
private:
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 6122c80d..58637d7c 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -217,15 +217,6 @@ QueuedEngineInterface::disconnect_all(const Path& patch_path,
void
-QueuedEngineInterface::set_voice_value(const Path& port_path,
- uint32_t voice,
- const Raul::Atom& value)
-{
- push_queued(new Events::SetPortValue(_engine, _request, true, now(), voice, port_path, value));
-}
-
-
-void
QueuedEngineInterface::set_property(const URI& uri,
const URI& predicate,
const Atom& value)
diff --git a/src/engine/QueuedEngineInterface.hpp b/src/engine/QueuedEngineInterface.hpp
index 8aa44f31..beaccb13 100644
--- a/src/engine/QueuedEngineInterface.hpp
+++ b/src/engine/QueuedEngineInterface.hpp
@@ -91,10 +91,6 @@ public:
const Raul::URI& predicate,
const Raul::Atom& value);
- virtual void set_voice_value(const Raul::Path& port_path,
- uint32_t voice,
- const Raul::Atom& value);
-
virtual void del(const Raul::Path& path);
// EngineInterface object commands
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;