You'll need to use a circular buffer. Obviously it's not possible to just randomly change buffer sizes, they're provided by the audio driver or plugin host.
Thank you!
Well i wonder were i should implement the buffer, because in the processBlock i get only the bufferdata from one call and this seems to be too less for quality pitch shifting.
Is there a way to store the input for the processBlock buffer call somewhere outside?
Dave from dRowAudio wrote an audiosource that wraps the SoundTouch library. (Using an interim buffer). Should be helpful even if you want to implement your own.