Increasing sample buffer size in VST plugin


Hi All,

I’m using latest JUCE version on PC and I was playing around with example delay plugin(VST) provided.

In the current form the input and output buffers are of same size. Is it possible to vary the output buffer size?

For Example: I want to increase the duration of a 1 sec audio(input) to 2 sec(output). Is this possible? Where should I specify the output buffer size or total number of output samples?

Thanks in advance,


Because it’s possible for some hosts to not like a changed buffer size, it may not be a good idea to do so.

Hint: You should be holding a buffer of your own internally.

If you would like to know how to vary an audio buffer’s size, see AudioSampleBuffer::setSize