summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/AddPortEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-12-11 22:32:31 +0000
committerDavid Robillard <d@drobilla.net>2006-12-11 22:32:31 +0000
commit9e2a757e026abf79d0cdcf12a18796fa89973356 (patch)
treeb739d65e9d15415b5fbfd1e9969e2efd7b498c25 /src/libs/engine/events/AddPortEvent.cpp
parentc9fdc9d94f3d6081e36e98f5ae6cc03f361e8057 (diff)
downloadingen-9e2a757e026abf79d0cdcf12a18796fa89973356.tar.gz
ingen-9e2a757e026abf79d0cdcf12a18796fa89973356.tar.bz2
ingen-9e2a757e026abf79d0cdcf12a18796fa89973356.zip
Serialization of patch ports.
git-svn-id: http://svn.drobilla.net/lad/ingen@216 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/AddPortEvent.cpp')
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp18
1 files changed, 12 insertions, 6 deletions
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));
}