I'm using the AudioTransportSource and I'm finding it clicks when I seek since the buffers in the ResamplingAudioSource don't get cleared on seek. I'm guessing this isn't usually a big deal since seeking clicks anyway.
What I'm trying to do is fillup background buffers using the AudioTransportSource. I have a huge set of AudioSampleBuffers that my audio engine thread reads from. I have a background thread that looks at the current playhead position, loop points, etc and tries to intelegently guess what audio is likely to be needed soon and load it into the buffers. The background thread uses an AudioTransportSource to load the appropriate chunks of each file.
For example if the order of operations is:
setNextReadPosition: position 0 seconds
getNextAudioBlock: duration 2 seconds
setNextReadPosition: position 4 seconds
getNextAudioBlock: duation 2 seconds
setNextReadPosition: position 2 seconds
getNextAudioBlock: duration 2 seconds
Then I've read 3 audio blocks from the file out of order, but if I put the resulting audio blocks in order, there will be clicks, as the start of each audio block will have 1 or 2 samples of audio from then end of the previously audio block.
I think each time there is a seek, the resample buffers should get flushed.