summaryrefslogtreecommitdiffstats
path: root/src/engine/events/CreatePortEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
committerDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
commit19928bb583e72802746b89e322f71ecc0fcb7427 (patch)
tree95912dc84d8c9dcf57939398514feaf148c1cd63 /src/engine/events/CreatePortEvent.cpp
parent96f839e64de70a23210847e322d24690299287fe (diff)
downloadingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.gz
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.bz2
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.zip
The great ID refactoring of 2009.
Path is now actually URI (scheme path: for now). Therefore ingen nodes and such live in the same namespace as ... well, everything. Including plugins. Thar be profit, laddies. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1992 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/CreatePortEvent.cpp')
-rw-r--r--src/engine/events/CreatePortEvent.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/engine/events/CreatePortEvent.cpp b/src/engine/events/CreatePortEvent.cpp
index 0e0dabd2..870a190c 100644
--- a/src/engine/events/CreatePortEvent.cpp
+++ b/src/engine/events/CreatePortEvent.cpp
@@ -40,8 +40,8 @@ namespace Ingen {
CreatePortEvent::CreatePortEvent(Engine& engine,
SharedPtr<Responder> responder,
SampleCount timestamp,
- const string& path,
- const string& type,
+ const Raul::Path& path,
+ const Raul::URI& type,
bool is_output,
QueuedEventSource* source)
: QueuedEvent(engine, responder, timestamp, true, source)
@@ -83,7 +83,7 @@ CreatePortEvent::pre_process()
assert(_patch->path() == _path.parent());
size_t buffer_size = 1;
- if (_type != "ingen:Float")
+ if (_type.str() != "ingen:Float")
buffer_size = _engine.audio_driver()->buffer_size();
const uint32_t old_num_ports = _patch->num_ports();
@@ -106,10 +106,10 @@ CreatePortEvent::pre_process()
_engine.engine_store()->add(_patch_port);
if (!_patch->parent()) {
- if (_type == "lv2:AudioPort") {
+ if (_type.str() == "lv2:AudioPort") {
_driver_port = _engine.audio_driver()->create_port(
dynamic_cast<DuplexPort*>(_patch_port));
- } else if (_type == "lv2ev:EventPort") {
+ } else if (_type.str() == "lv2ev:EventPort") {
_driver_port = _engine.midi_driver()->create_port(
dynamic_cast<DuplexPort*>(_patch_port));
}
@@ -136,9 +136,9 @@ CreatePortEvent::execute(ProcessContext& context)
}
if (_driver_port) {
- if (_type == "lv2:AudioPort") {
+ if (_type.str() == "lv2:AudioPort") {
_engine.audio_driver()->add_port(_driver_port);
- } else if (_type == "lv2ev:EventPort") {
+ } else if (_type.str() == "lv2ev:EventPort") {
_engine.midi_driver()->add_port(_driver_port);
}
}
@@ -158,11 +158,11 @@ CreatePortEvent::post_process()
_engine.broadcaster()->send_object(_patch_port, true);
break;
case UNKNOWN_TYPE:
- msg = string("Could not create port ") + _path + " (Unknown type)";
+ msg = string("Could not create port ") + _path.str() + " (Unknown type)";
_responder->respond_error(msg);
break;
case CREATION_FAILED:
- msg = string("Could not create port ") + _path + " (Creation failed)";
+ msg = string("Could not create port ") + _path.str() + " (Creation failed)";
_responder->respond_error(msg);
break;
}