Reporting plugin delay to DAW for compensation
How does plugin processing delay get reported to the DAW for compensation?
Is exporting to code, implementing setLatencySamples(), and then building manually the only way to do this?
not only on load, it can also be called again after it changed (see kLatencyChanges in the SDK)
Any plans on implementing that into RNBO?
I'm having trouble finding that in the SDK https://rnbo.cycling74.com/cpp
Would you be able to point me to the ref?
I've done this by adding JuceAudioProcessor::setLatencySamples(4096);
under:void JuceAudioProcessor::prepareToPlay(double sampleRate, int estimatedSamplesPerBlock) {
inside export\rnbo\adapters\juce\RNBO_JuceAudioProcessor.cpp
IDK if that's the best way, but it works.
EDIT:
I'm new to C++ and just realized that's not ideal as exporting from Max will overwrite that, so I added to src\CustomAudioProcessor.h:void prepareToPlay (double sampleRate, int samplesPerBlock) override;
and added to src\CustomAudioProcessor.cpp:void CustomAudioProcessor::prepareToPlay(double sampleRate, int estimatedSamplesPerBlock)
{
_rnboObject.prepareToProcess(sampleRate, estimatedSamplesPerBlock);
JuceAudioProcessor::setLatencySamples(4096);
}