summaryrefslogtreecommitdiff
path: root/libs/ardour/buffer_set.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-29 03:21:37 +0000
committerDavid Robillard <d@drobilla.net>2012-02-29 03:21:37 +0000
commit8de887f378b13e558bdd74e88be79dc96df9d7b4 (patch)
tree1942e36555c801bc0986e2796403719dc3e19331 /libs/ardour/buffer_set.cc
parent9dd4d79d6c8cf3169b7f755883245597f919065e (diff)
Update to latest LV2 atom extension.
git-svn-id: svn://localhost/ardour2/branches/3.0@11548 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/buffer_set.cc')
-rw-r--r--libs/ardour/buffer_set.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index bf114b95d5..156cf4dd3f 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -190,8 +190,10 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
if (type == DataType::MIDI && _lv2_buffers.size() < _buffers[type].size() * 2 + 1) {
while (_lv2_buffers.size() < _buffers[type].size() * 2) {
_lv2_buffers.push_back(
- std::make_pair(false,
- lv2_evbuf_new(buffer_capacity, LV2_EVBUF_EVENT, 0)));
+ std::make_pair(false, lv2_evbuf_new(buffer_capacity,
+ LV2_EVBUF_EVENT,
+ LV2Plugin::_chunk_type,
+ LV2Plugin::_sequence_type)));
}
}
#endif
@@ -251,25 +253,23 @@ BufferSet::get(DataType type, size_t i) const
#ifdef LV2_SUPPORT
LV2_Evbuf*
-BufferSet::get_lv2_midi(bool input, size_t i, uint32_t atom_type)
+BufferSet::get_lv2_midi(bool input, size_t i, bool old_api)
{
assert(count().get(DataType::MIDI) > i);
MidiBuffer& mbuf = get_midi(i);
LV2Buffers::value_type b = _lv2_buffers.at(i * 2 + (input ? 0 : 1));
LV2_Evbuf* evbuf = b.second;
- lv2_evbuf_set_type(evbuf,
- atom_type ? LV2_EVBUF_ATOM : LV2_EVBUF_EVENT,
- atom_type);
+ lv2_evbuf_set_type(evbuf, old_api ? LV2_EVBUF_EVENT : LV2_EVBUF_ATOM);
- lv2_evbuf_reset(evbuf);
+ lv2_evbuf_reset(evbuf, input);
if (input) {
DEBUG_TRACE(PBD::DEBUG::LV2,
string_compose("%1 bytes of MIDI waiting @ %2\n",
mbuf.size(), (void*) mbuf.data()));
LV2_Evbuf_Iterator i = lv2_evbuf_begin(evbuf);
- const uint32_t type = LV2Plugin::midi_event_type(atom_type == 0);
+ const uint32_t type = LV2Plugin::midi_event_type(old_api);
for (MidiBuffer::iterator e = mbuf.begin(); e != mbuf.end(); ++e) {
const Evoral::MIDIEvent<framepos_t> ev(*e, false);
#ifndef NDEBUG