From e9a8ccc7e2826d8fe91eff34ee8a0683a7f7aac6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 25 Jun 2016 02:23:56 +0200 Subject: major internal plugin & processor API change: Pass current (latency compensated) cycle times to plugin. This fixes time-reporting to plugins and also fixes automation and when bouncing (the session->transport* is not valid) etc. --- libs/ardour/vst_plugin.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libs/ardour/vst_plugin.cc') diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 3b7f9776d0..b517b480b6 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -46,6 +46,8 @@ VSTPlugin::VSTPlugin (AudioEngine& engine, Session& session, VSTHandle* handle) , _plugin (0) , _pi (0) , _num (0) + , _transport_frame (0) + , _transport_speed (0.f) { memset (&_timeInfo, 0, sizeof(_timeInfo)); } @@ -533,10 +535,14 @@ VSTPlugin::automatable () const int VSTPlugin::connect_and_run (BufferSet& bufs, + framepos_t start, framepos_t end, double speed, ChanMapping in_map, ChanMapping out_map, pframes_t nframes, framecnt_t offset) { - Plugin::connect_and_run (bufs, in_map, out_map, nframes, offset); + Plugin::connect_and_run(bufs, start, end, speed, in_map, out_map, nframes, offset); + + _transport_frame = start; + _transport_speed = speed; ChanCount bufs_count; bufs_count.set(DataType::AUDIO, 1); -- cgit v1.2.3