summaryrefslogtreecommitdiffstats
path: root/src/engine/events/RequestMetadata.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-11-12 06:56:26 +0000
committerDavid Robillard <d@drobilla.net>2009-11-12 06:56:26 +0000
commit64bd557e75113743f179086b365ea7d97b72ee3e (patch)
tree6a6f5b72a8ce97616cd5ccff188f2e44e92d1ba8 /src/engine/events/RequestMetadata.cpp
parent023dcf4cb297928879eb0e53cf0216edb562f6fa (diff)
downloadingen-64bd557e75113743f179086b365ea7d97b72ee3e.tar.gz
ingen-64bd557e75113743f179086b365ea7d97b72ee3e.tar.bz2
ingen-64bd557e75113743f179086b365ea7d97b72ee3e.zip
String port support.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2255 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/RequestMetadata.cpp')
-rw-r--r--src/engine/events/RequestMetadata.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/engine/events/RequestMetadata.cpp b/src/engine/events/RequestMetadata.cpp
index 145260ef..e633ca10 100644
--- a/src/engine/events/RequestMetadata.cpp
+++ b/src/engine/events/RequestMetadata.cpp
@@ -25,6 +25,7 @@
#include "PortImpl.hpp"
#include "PluginImpl.hpp"
#include "AudioBuffer.hpp"
+#include "StringBuffer.hpp"
using namespace std;
using namespace Raul;
@@ -36,11 +37,11 @@ using namespace Shared;
RequestMetadata::RequestMetadata(Engine& engine,
- SharedPtr<Responder> responder,
- SampleCount timestamp,
- bool is_meta,
- const URI& subject,
- const URI& key)
+ SharedPtr<Responder> responder,
+ SampleCount timestamp,
+ bool is_meta,
+ const URI& subject,
+ const URI& key)
: QueuedEvent(engine, responder, timestamp)
, _error(NO_ERROR)
, _special_type(NONE)
@@ -93,6 +94,8 @@ RequestMetadata::execute(ProcessContext& context)
if (port) {
if (port->type() == DataType::CONTROL || port->type() == DataType::AUDIO)
_value = ((AudioBuffer*)port->buffer(0))->value_at(0); // TODO: offset
+ else if (port->type() == DataType::STRING)
+ _value = (char*)((StringBuffer*)port->buffer(0))->data();
} else {
_resource = 0;
}