summaryrefslogtreecommitdiffstats
path: root/src/client
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/client
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/client')
-rw-r--r--src/client/PluginUI.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp
index 405dd099..3007e723 100644
--- a/src/client/PluginUI.cpp
+++ b/src/client/PluginUI.cpp
@@ -17,6 +17,7 @@
#include <iostream>
#include "event.lv2/event-helpers.h"
+#include "string-port.lv2/string-port.h"
#include "shared/LV2Features.hpp"
#include "shared/LV2URIMap.hpp"
#include "PluginUI.hpp"
@@ -67,7 +68,7 @@ lv2_ui_write(LV2UI_Controller controller,
ui->world()->engine->set_port_value(port->path(), Atom(*(float*)buffer));
- // FIXME: slow, need to cache ID
+ // FIXME: this is slow, cache ID
} else if (format == map->uri_to_id(NULL, "http://lv2plug.in/ns/extensions/ui#Events")) {
uint32_t midi_event_type = map->uri_to_id(NULL, "http://lv2plug.in/ns/ext/midi#MidiEvent");
LV2_Event_Buffer* buf = (LV2_Event_Buffer*)buffer;
@@ -87,6 +88,12 @@ lv2_ui_write(LV2UI_Controller controller,
lv2_event_increment(&iter);
}
+
+ // FIXME: this is slow, cache ID
+ } else if (format == map->uri_to_id(NULL, "http://lv2plug.in/ns/dev/string-port#StringTransfer")) {
+ LV2_String_Data* buf = (LV2_String_Data*)buffer;
+ ui->world()->engine->set_port_value(port->path(), buf->data);
+
} else {
cerr << "WARNING: Unknown value format " << format
<< ", either plugin " << ui->node()->plugin()->uri() << " is broken"