summaryrefslogtreecommitdiffstats
path: root/src/engine/events/SetPortValue.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
committerDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
commit059f20c9666234f2be01498ee04f1e7ee795ba8f (patch)
treeef0d53073d53012aeaa7d084fccf477b166c0684 /src/engine/events/SetPortValue.cpp
parent085a451dfec54126be1b9346899c81d82e6eb58e (diff)
downloadingen-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/engine/events/SetPortValue.cpp')
-rw-r--r--src/engine/events/SetPortValue.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/events/SetPortValue.cpp b/src/engine/events/SetPortValue.cpp
index b93783c2..1a41938d 100644
--- a/src/engine/events/SetPortValue.cpp
+++ b/src/engine/events/SetPortValue.cpp
@@ -102,7 +102,7 @@ SetPortValue::pre_process()
if (_port) {
_port->set_value(_value);
- _port->set_property(_engine.world()->uris->ingen_value, _value);
+ _port->set_property(_engine.world()->uris()->ingen_value, _value);
}
QueuedEvent::pre_process();
@@ -151,7 +151,7 @@ SetPortValue::apply(Context& context)
return;
}
- SharedPtr<LV2URIMap> uris = _engine.world()->uris;
+ LV2URIMap& uris = *_engine.world()->uris().get();
EventBuffer* const ebuf = dynamic_cast<EventBuffer*>(buf);
if (ebuf) {
@@ -159,14 +159,14 @@ SetPortValue::apply(Context& context)
// Size 0 event, pass it along to the plugin as a typed but empty event
if (_value.data_size() == 0) {
- const uint32_t type_id = uris->uri_to_id(NULL, _value.get_blob_type());
+ const uint32_t type_id = uris.uri_to_id(NULL, _value.get_blob_type());
ebuf->append(frames, 0, type_id, 0, NULL);
_port->raise_set_by_user_flag();
return;
} else if (!strcmp(_value.get_blob_type(), "http://lv2plug.in/ns/ext/midi#MidiEvent")) {
ebuf->prepare_write(context);
- ebuf->append(frames, 0, uris->midi_event.id, _value.data_size(),
+ ebuf->append(frames, 0, uris.midi_event.id, _value.data_size(),
(const uint8_t*)_value.get_blob());
_port->raise_set_by_user_flag();
return;
@@ -176,7 +176,7 @@ SetPortValue::apply(Context& context)
ObjectBuffer* const obuf = dynamic_cast<ObjectBuffer*>(buf);
if (obuf) {
obuf->object()->size = obuf->size() - sizeof(LV2_Object);
- if (LV2Object::from_atom(_value, obuf->object())) {
+ if (LV2Object::from_atom(uris, _value, obuf->object())) {
debug << "Converted atom " << _value << " :: " << obuf->object()->type
<< " * " << obuf->object()->size << " @ " << obuf->object() << endl;
return;
@@ -200,7 +200,7 @@ SetPortValue::post_process()
assert(_port != NULL);
_request->respond_ok();
_engine.broadcaster()->set_property(_port_path,
- _engine.world()->uris->ingen_value, _value);
+ _engine.world()->uris()->ingen_value, _value);
break;
case TYPE_MISMATCH:
ss << "Illegal value type " << _value.type()