From 86edc1ccfee6ef927b171959df7121b414a6b987 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 16 Feb 2016 15:32:58 -0600 Subject: Fill some more VST transport flags. --- libs/ardour/ardour/vestige/aeffectx.h | 5 +++++ libs/ardour/session_vst.cc | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/libs/ardour/ardour/vestige/aeffectx.h b/libs/ardour/ardour/vestige/aeffectx.h index f09c009993..2b839f0ab1 100644 --- a/libs/ardour/ardour/vestige/aeffectx.h +++ b/libs/ardour/ardour/vestige/aeffectx.h @@ -135,7 +135,12 @@ struct RemoteVstPlugin; +#define kVstTransportChanged 1 #define kVstTransportPlaying (1 << 1) +#define kVstTransportCycleActive (1 << 2) + +#define kVstAutomationWriting (1 << 6) +#define kVstAutomationReading (1 << 7) #define kVstNanosValid (1 << 8) #define kVstPpqPosValid (1 << 9) diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc index 96dc4115c7..c6978eddc7 100644 --- a/libs/ardour/session_vst.cc +++ b/libs/ardour/session_vst.cc @@ -249,11 +249,18 @@ intptr_t Session::vst_callback ( _timeInfo.flags |= (kVstSmpteValid); } + //ToDo: + //if this is found to be burdensome to plugins, + //we should cache the previous state at a global level, + //and only set this flag when the transport changes state + _timeInfo.flags |= (kVstTransportChanged); + if (session->transport_speed() != 0.0f) { _timeInfo.flags |= (kVstTransportPlaying); } if (session->get_play_loop()) { + _timeInfo.flags |= (kVstTransportCycleActive); } } else { -- cgit v1.2.3