summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/DataType.h1
-rw-r--r--src/libs/engine/OSCClientSender.cpp2
-rw-r--r--src/libs/engine/OSCEngineReceiver.cpp2
-rw-r--r--src/libs/engine/ObjectSender.cpp6
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp18
5 files changed, 19 insertions, 10 deletions
diff --git a/src/libs/engine/DataType.h b/src/libs/engine/DataType.h
index c658eccc..fbfda7a6 100644
--- a/src/libs/engine/DataType.h
+++ b/src/libs/engine/DataType.h
@@ -56,6 +56,7 @@ public:
inline bool operator!=(const Symbol& symbol) const { return (_symbol != symbol); }
inline bool operator==(const DataType& type) const { return (_symbol == type._symbol); }
inline bool operator!=(const DataType& type) const { return (_symbol != type._symbol); }
+
private:
Symbol _symbol;
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp
index eaceb14c..e858e572 100644
--- a/src/libs/engine/OSCClientSender.cpp
+++ b/src/libs/engine/OSCClientSender.cpp
@@ -330,7 +330,7 @@ void OSCClientSender::new_node(string plugin_uri,
/** \page client_osc_namespace
* <p> \b /om/new_port - Notification of a new port's creation.
* \arg \b path (string) - Path of new port
- * \arg \b data-type (string) - Type of port (CONTROL or AUDIO)
+ * \arg \b data-type (string) - Type of port (ingen:audio, ingen:control, or ingen:midi)
* \arg \b direction ("is-output") (integer) - Direction of data flow (Input = 0, Output = 1)
*
* \li Note that in the event of loading a patch, this message could be
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp
index b7e8f3a1..26377a37 100644
--- a/src/libs/engine/OSCEngineReceiver.cpp
+++ b/src/libs/engine/OSCEngineReceiver.cpp
@@ -479,7 +479,7 @@ OSCEngineReceiver::m_clear_patch_cb(const char* path, const char* types, lo_arg*
* <p> \b /om/synth/create_port - Add a port into a given patch (load a plugin by URI)
* \arg \b response-id (integer)
* \arg \b path (string) - Full path of the new port (ie. /patch2/subpatch/newport)
- * \arg \b data-type (string) - Data type for port to contain ("AUDIO", "CONTROL", or "MIDI")
+ * \arg \b data-type (string) - Data type for port to contain ("ingen:audio", "ingen:control", or "ingen:midi")
* \arg \b direction ("is-output") (integer) - Direction of data flow (Input = 0, Output = 1) </p> \n \n
*/
int
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp
index 6e93f405..8b238c72 100644
--- a/src/libs/engine/ObjectSender.cpp
+++ b/src/libs/engine/ObjectSender.cpp
@@ -130,9 +130,11 @@ ObjectSender::send_port(ClientInterface* client, const Port* port)
string type = port->type().uri();
if (port->type() == DataType::FLOAT) {
if (port->buffer_size() == 1)
- type = "CONTROL";
+ type = "ingen:control";
else
- type = "AUDIO";
+ type = "ingen:audio";
+ } else if (port->type() == DataType::MIDI) {
+ type = "ingen:midi";
}
//cerr << ", type = " << type << endl;
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp
index 08126d3a..aa7c3ca5 100644
--- a/src/libs/engine/events/AddPortEvent.cpp
+++ b/src/libs/engine/events/AddPortEvent.cpp
@@ -38,7 +38,13 @@
namespace Ingen {
-AddPortEvent::AddPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source)
+AddPortEvent::AddPortEvent(Engine& engine,
+ SharedPtr<Responder> responder,
+ SampleCount timestamp,
+ const string& path,
+ const string& type,
+ bool is_output,
+ QueuedEventSource* source)
: QueuedEvent(engine, responder, timestamp, true, source),
_path(path),
_type(type),
@@ -57,9 +63,9 @@ AddPortEvent::AddPortEvent(Engine& engine, SharedPtr<Responder> responder, Sampl
*/
string type_str;
- if (type == "CONTROL" || type == "AUDIO")
+ if (type == "ingen:control" || type == "ingen:audio")
_data_type = DataType::FLOAT;
- else if (type == "MIDI")
+ else if (type == "ingen:midi")
_data_type = DataType::MIDI;
}
@@ -80,7 +86,7 @@ AddPortEvent::pre_process()
assert(_patch->path() == _path.parent());
size_t buffer_size = 1;
- if (_type == "AUDIO" || _type == "MIDI")
+ if (_type == "ingen:audio" || _type == "ingen:midi")
buffer_size = _engine.audio_driver()->buffer_size();
const size_t old_num_ports = _patch->num_ports();
@@ -104,10 +110,10 @@ AddPortEvent::pre_process()
_engine.object_store()->add(_patch_port);
if (!_patch->parent()) {
- if (_type == "AUDIO")
+ if (_type == "ingen:audio")
_driver_port = _engine.audio_driver()->create_port(
dynamic_cast<DuplexPort<Sample>*>(_patch_port));
- else if (_type == "MIDI")
+ else if (_type == "ingen:midi")
_driver_port = _engine.midi_driver()->create_port(
dynamic_cast<DuplexPort<MidiMessage>*>(_patch_port));
}