π π A Python library for audio.
C audioaudio-processingaudio-productionaudio-researchaudio-unitaugmentationjucemachine-learningpybind11pythonvst3vst3-host
Support external plugins with latency greater than a single buffer.
Peter Sobot1dd25d7451b7
diff --git a/pedalboard/ExternalPlugin.h b/pedalboard/ExternalPlugin.hindex 6394dee..606c9f2 100644--- a/pedalboard/ExternalPlugin.h+++ b/pedalboard/ExternalPlugin.h@@ -620,7 +620,7 @@ public:// To compensate for any latency added by the plugin,// only tell Pedalboard to use the last _n_ samples.long usableSamplesProduced =- samplesProvided - pluginInstance->getLatencySamples();+ std::max(0L, samplesProvided - pluginInstance->getLatencySamples());return static_cast<int>(std::min(usableSamplesProduced, (long)outputBlock.getNumSamples()));}