diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-27 14:45:40 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-27 14:46:24 +0200 |
commit | 4005ef9db646ed71831a0da2b13161215cb7f7c6 (patch) | |
tree | 7435790eb4e360488eb9086aca493eca8885451c /libs/ardour/lv2_plugin.cc | |
parent | 2cc7faab21df6d3732d35fa71607999d690ddf73 (diff) |
tweak LV2 atom buffer allocation strategy
Allow to re-use Midi buffers for GUI communication. Honor
resize-port extension for all Atom Sequence buffers.
(following example of http://lv2plug.in/book/#_sampler)
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 6a5ed97aae..a5c87c8d6a 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -2119,8 +2119,7 @@ LV2Plugin::allocate_atom_event_buffers() LilvNodes* atom_supports = lilv_port_get_value( p, port, _world.atom_supports); - if (!lilv_nodes_contains(buffer_types, _world.atom_Sequence) - || !lilv_nodes_contains(atom_supports, _world.midi_MidiEvent)) { + if (lilv_nodes_contains(buffer_types, _world.atom_Sequence)) { if (lilv_port_is_a(p, port, _world.lv2_InputPort)) { count_atom_in++; } @@ -2147,7 +2146,7 @@ LV2Plugin::allocate_atom_event_buffers() return; } - DEBUG_TRACE(DEBUG::LV2, string_compose("allocate %1 atom_ev_buffers of %d bytes\n", total_atom_buffers, minimumSize)); + DEBUG_TRACE(DEBUG::LV2, string_compose("allocate %1 atom_ev_buffers of %2 bytes\n", total_atom_buffers, minimumSize)); _atom_ev_buffers = (LV2_Evbuf**) malloc((total_atom_buffers + 1) * sizeof(LV2_Evbuf*)); for (int i = 0; i < total_atom_buffers; ++i ) { _atom_ev_buffers[i] = lv2_evbuf_new(minimumSize, LV2_EVBUF_ATOM, |