From 64bd557e75113743f179086b365ea7d97b72ee3e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Nov 2009 06:56:26 +0000 Subject: String port support. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2255 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/PluginUI.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/client/PluginUI.cpp') 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 #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" -- cgit v1.2.1