From 879b9c99310e45faeb7a00a5fade4acf40a28a54 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Mon, 27 Apr 2015 20:17:13 -0500 Subject: [PATCH] Fix for bug #922. --- src/effects/VST/VSTEffect.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp index 460849869..4e92e8bf8 100644 --- a/src/effects/VST/VSTEffect.cpp +++ b/src/effects/VST/VSTEffect.cpp @@ -1839,11 +1839,15 @@ bool VSTEffect::ProcessFinalize() sampleCount VSTEffect::ProcessBlock(float **inBlock, float **outBlock, sampleCount blockLen) { - // Go let the plugin moleste the samples - callProcessReplacing(inBlock, outBlock, blockLen); + // Only call the effect if there's something to do...some do not like zero-length block + if (blockLen) + { + // Go let the plugin moleste the samples + callProcessReplacing(inBlock, outBlock, blockLen); - // And track the position - mTimeInfo.samplePos += ((double) blockLen / mTimeInfo.sampleRate); + // And track the position + mTimeInfo.samplePos += ((double) blockLen / mTimeInfo.sampleRate); + } return blockLen; }