diff options
author | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
commit | 059f20c9666234f2be01498ee04f1e7ee795ba8f (patch) | |
tree | ef0d53073d53012aeaa7d084fccf477b166c0684 /src/client/PluginUI.cpp | |
parent | 085a451dfec54126be1b9346899c81d82e6eb58e (diff) | |
download | ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.gz ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.bz2 ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.zip |
Save Ingen patches as working standard LV2 plugin bundles.
This allows you to create an Ingen patch in Ingen running as a Jack client,
save it, then load that patch as an LV2 plugin in any LV2 compliant host.
Eliminate (hopefully) all static data in the engine (for multiple instantiations in a single process).
More API/ABI stable interface for Ingen::Shared::World.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2533 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/PluginUI.cpp')
-rw-r--r-- | src/client/PluginUI.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index f943e54f..b19211e6 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -55,7 +55,7 @@ lv2_ui_write(LV2UI_Controller controller, SharedPtr<PortModel> port = ui->node()->ports()[port_index]; - SharedPtr<Shared::LV2URIMap> map = ui->world()->uris; + const Shared::LV2URIMap& uris = *ui->world()->uris().get(); // float (special case, always 0) if (format == 0) { @@ -63,18 +63,18 @@ lv2_ui_write(LV2UI_Controller controller, if (*(float*)buffer == port->value().get_float()) return; // do nothing (handle stupid plugin UIs that feed back) - ui->world()->engine->set_property(port->path(), map->ingen_value, Atom(*(float*)buffer)); + ui->world()->engine()->set_property(port->path(), uris.ingen_value, Atom(*(float*)buffer)); - } else if (format == map->ui_format_events.id) { + } else if (format == uris.ui_format_events.id) { LV2_Event_Buffer* buf = (LV2_Event_Buffer*)buffer; LV2_Event_Iterator iter; uint8_t* data; lv2_event_begin(&iter, buf); while (lv2_event_is_valid(&iter)) { LV2_Event* const ev = lv2_event_get(&iter, &data); - if (ev->type == map->midi_event.id) { + if (ev->type == uris.midi_event.id) { // FIXME: bundle multiple events by writing an entire buffer here - ui->world()->engine->set_property(port->path(), map->ingen_value, + ui->world()->engine()->set_property(port->path(), uris.ingen_value, Atom("http://lv2plug.in/ns/ext/midi#MidiEvent", ev->size, data)); } else { warn << "Unable to send event type " << ev->type << @@ -84,11 +84,11 @@ lv2_ui_write(LV2UI_Controller controller, lv2_event_increment(&iter); } - } else if (format == map->object_transfer.id) { + } else if (format == uris.object_transfer.id) { LV2_Object* buf = (LV2_Object*)buffer; Raul::Atom val; - Shared::LV2Object::to_atom(buf, val); - ui->world()->engine->set_property(port->path(), map->ingen_value, val); + Shared::LV2Object::to_atom(uris, buf, val); + ui->world()->engine()->set_property(port->path(), uris.ingen_value, val); } else { warn << "Unknown value format " << format @@ -122,7 +122,7 @@ PluginUI::create(Ingen::Shared::World* world, Glib::Mutex::Lock lock(PluginModel::rdf_world()->mutex()); SharedPtr<PluginUI> ret; - SLV2Value gtk_gui_uri = slv2_value_new_uri(world->slv2_world, + SLV2Value gtk_gui_uri = slv2_value_new_uri(world->slv2_world(), "http://lv2plug.in/ns/extensions/ui#GtkUI"); SLV2UIs uis = slv2_plugin_get_uis(plugin); @@ -141,7 +141,7 @@ PluginUI::create(Ingen::Shared::World* world, if (ui) { info << "Found GTK Plugin UI: " << slv2_ui_get_uri(ui) << endl; ret = SharedPtr<PluginUI>(new PluginUI(world, node)); - ret->_features = world->lv2_features->lv2_features(node.get()); + ret->_features = world->lv2_features()->lv2_features(node.get()); SLV2UIInstance inst = slv2_ui_instantiate( plugin, ui, lv2_ui_write, ret.get(), ret->_features->array()); |