Skip to content

Commit 879b9c9

Browse files
committed
Fix for bug #922.
1 parent e684fe9 commit 879b9c9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/effects/VST/VSTEffect.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -1839,11 +1839,15 @@ bool VSTEffect::ProcessFinalize()
18391839

18401840
sampleCount VSTEffect::ProcessBlock(float **inBlock, float **outBlock, sampleCount blockLen)
18411841
{
1842-
// Go let the plugin moleste the samples
1843-
callProcessReplacing(inBlock, outBlock, blockLen);
1842+
// Only call the effect if there's something to do...some do not like zero-length block
1843+
if (blockLen)
1844+
{
1845+
// Go let the plugin moleste the samples
1846+
callProcessReplacing(inBlock, outBlock, blockLen);
18441847

1845-
// And track the position
1846-
mTimeInfo.samplePos += ((double) blockLen / mTimeInfo.sampleRate);
1848+
// And track the position
1849+
mTimeInfo.samplePos += ((double) blockLen / mTimeInfo.sampleRate);
1850+
}
18471851

18481852
return blockLen;
18491853
}

0 commit comments

Comments
 (0)