ResamplingAudioSource 1+ calls to input->getNextAudioBlock() when ratio=1?


#1

Hello JUCErs,

Currently ResamplingAudioSource may call more than once it’s input->getNextAudioBlock(), even though resampling ratio=1.

There is some internal buffering which causes it, but I am wondering whether this was intended or not?
With bufferSize=32 samples it would call input->getNextAudioBlock() with numSamples=29 and then numSamples=3, which seems suboptimal.


How do I wrap a Sampler/Synthesiser inside of an AudioSource?