From 4c5ef5318edb4e1cdc76288860c27358155efe17 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 17 Nov 2012 18:41:19 +0000 Subject: 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 --- libs/ardour/buffer_set.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/ardour/buffer_set.cc') 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 ev(*e, false); #ifndef NDEBUG -- cgit v1.2.3