Fill some more VST transport flags.

This commit is contained in:
Ben Loftis 2016-02-16 15:32:58 -06:00
parent f30d1d6073
commit 86edc1ccfe
2 changed files with 12 additions and 0 deletions

View File

@ -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)

View File

@ -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 {