I’d really like to understand how to get to the bottom of the latency issues I’m running into. Let me explain:
I have a VST effect which is able to capture sound from the DAW and sequence it within it’s interface. To trigger it a user presses “Record” which sets the plugin to recording mode and then when the user hits play in their daw I detect the play by checking the “AudioPlayHead::CurrentPositionInfo.isPlaying” flag and it will start copying all the contents of the incoming buffer into it’s own buffer - when the user hits stop than this is then visualized on the screen and the user can hit play etc.
Since it’s a sequencer the amount of tracks/samples and therefore time between the start of processBlock and end of processBlock can vary - I’ve noticed when trying to record in different hosts sometimes the recording is accurate, sometimes its very slightly off, and sometimes noticeably off. I just can’t put my finger on how to adjust this so that no matter the circumstances when I decided to capture the audio from the daw the recorded audio is in sync with the daw. When I hit play in the daw, it should be perfectly aligned with whats recorded.
Any advice appreciated!