And while I'm still here, if you have constant playback from a queue, but still get gaps in the audio, it could mean a number of things:
- Your queue doesn't have enough time to accumulate a reasonable amount of data before attempting to playback what's there. This could result in rapidly chopped output. You could solve this problem by making sure that you don't pull any data from the queue, unless its length exceeds a defined threshold. The size of this threshold will increase the offset between the audio source and destination. But the greater the threshold, the more stable the stream will be.
- It could also mean that data is not transferred quickly enough. Run some tests between local machines and see if it is still choppy. If it is still choppy, then your algorithm is not sufficient. If it only happens between distant machines, you should consider lowering the quality of the stream, by using a lower bitrate if you aren't already.