summaryrefslogtreecommitdiff
path: root/libs/ardour/buffer_set.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-17 18:41:19 +0000
committerDavid Robillard <d@drobilla.net>2012-11-17 18:41:19 +0000
commit4c5ef5318edb4e1cdc76288860c27358155efe17 (patch)
treeb799988e6b5ef0a105d9c89fa9399c35b6b604e2 /libs/ardour/buffer_set.cc
parentdd78c6ed719c717a892e47e8b4ef5702ced7eb8d (diff)
Sent precise transport information to LV2 plugins via events.
We send the full transport state (frame position, BBT time, transport speed, meter) to the plugin: * At the start of a cycle whenever a relocate or transport speed change has occurred * On every occurrence of a meter change within a cycle This means the plugin gets a sample accurate meter/tempo map, even if the meter changes in the middle of a cycle. However, this is not quite right yet: things can get wonky if the tempo map is edited while rolling, since this code will not detect the change and fail to update the plugin at the start of the cycle. Other changes: * Factor out TempoMetric::set_metric() and simplify some tempo functions * Clean up LV2 URID stuff git-svn-id: svn://localhost/ardour2/branches/3.0@13513 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/buffer_set.cc')
-rw-r--r--libs/ardour/buffer_set.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index f9e683cdda..c2be5ca007 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -192,8 +192,8 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
_lv2_buffers.push_back(
std::make_pair(false, lv2_evbuf_new(buffer_capacity,
LV2_EVBUF_EVENT,
- LV2Plugin::_chunk_type,
- LV2Plugin::_sequence_type)));
+ LV2Plugin::urids.atom_Chunk,
+ LV2Plugin::urids.atom_Sequence)));
}
}
#endif
@@ -269,7 +269,7 @@ BufferSet::get_lv2_midi(bool input, size_t i, bool old_api)
mbuf.size(), (void*) mbuf.data()));
LV2_Evbuf_Iterator i = lv2_evbuf_begin(evbuf);
- const uint32_t type = LV2Plugin::midi_event_type();
+ const uint32_t type = LV2Plugin::urids.midi_MidiEvent;
for (MidiBuffer::iterator e = mbuf.begin(); e != mbuf.end(); ++e) {
const Evoral::MIDIEvent<framepos_t> ev(*e, false);
#ifndef NDEBUG