More information: it is entirely possible that I just don't fully understand how it should work but I'm observing the following behaviour that I can't explain. I am debugging a VST plugin using the following code:
void processReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
{
VstTimeInfo* pInfo = getTimeInfo(0);
if (pInfo) {
if (pInfo && (pInfo->flags & kVstTransportChanged) && (pInfo->flags & kVstTransportPlaying)) {
// set breakpoint here
// it will hit only the first time that playback starts
}
}
I have a project set up. Plugin is inserted on a track, nothing else. BPM = 117. I have a ruler offset of 4 bars, so the first bar is -3, then -2, etc. Bar 1 is actually the fourth bar of the project. I set the playback cursor at bar 1 and start playback and then look at the values I receive from getTimeInfo(). This is what I get:
samplePos = 5.4999999999736815
ppqPos = 15.999993197278911
I would expect to see this:
samplePos = 0.0000000000000
ppqPos = 16.0000000000000
|