diff options
author | David Robillard <d@drobilla.net> | 2012-08-21 19:29:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-21 19:29:19 +0000 |
commit | 7b7140f5ed2ad2fdb58bebb70302628fd3172663 (patch) | |
tree | df155548da11d2f7d851c672f5d8745ac0e46f1a /libs/ardour/lv2_plugin.cc | |
parent | 7baf499ca790b3c471f773b0460ee91b3bd677d0 (diff) |
Create and realize LV2 UI container before instantiating (required for proper embedding in some situations).
git-svn-id: svn://localhost/ardour2/branches/3.0@13140 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 407b77a214..7d5c88402e 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -1090,7 +1090,7 @@ LV2Plugin::write_to(RingBuffer<uint8_t>* dest, uint32_t index, uint32_t protocol, uint32_t size, - uint8_t* body) + const uint8_t* body) { const uint32_t buf_size = sizeof(UIMessage) + size; uint8_t buf[buf_size]; @@ -1107,10 +1107,10 @@ LV2Plugin::write_to(RingBuffer<uint8_t>* dest, } void -LV2Plugin::write_from_ui(uint32_t index, - uint32_t protocol, - uint32_t size, - uint8_t* body) +LV2Plugin::write_from_ui(uint32_t index, + uint32_t protocol, + uint32_t size, + const uint8_t* body) { if (!_from_ui) { _from_ui = new RingBuffer<uint8_t>(4096); @@ -1120,12 +1120,11 @@ LV2Plugin::write_from_ui(uint32_t index, } void -LV2Plugin::write_to_ui(uint32_t index, - uint32_t protocol, - uint32_t size, - uint8_t* body) +LV2Plugin::write_to_ui(uint32_t index, + uint32_t protocol, + uint32_t size, + const uint8_t* body) { - std::cerr << "WRITE TO UI" << std::endl; write_to(_to_ui, index, protocol, size, body); } @@ -1465,7 +1464,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs, LV2_Evbuf_Iterator i = lv2_evbuf_end(buf); const LV2_Atom* const atom = (const LV2_Atom*)body; lv2_evbuf_write(&i, nframes, 0, atom->type, atom->size, - (const uint8_t*)LV2_ATOM_BODY(atom)); + (const uint8_t*)(atom + 1)); } else { error << "Received unknown message type from UI" << endmsg; } |