I think I found the problem with dropouts in streaming playback.

I have noticed a few streams that exhibit these problems for me, but I had just assumed that it was a slow server because changing to another feed of the same stream almost always cleared up the problem. Anyway I was playing around with the buffer on one of the streams that did have dropouts and found that decreasing the buffer size eliminated the dropouts.

I'm pretty sure what's going on is that the InputCallback always tries to fill the buffer as much as possible, and since streams are more ore less realtime it can end up waiting too long to fill the buffer and the output buffer empties before MAD can refill it. To solve this I'm going to create another thread that is solely responsible for collecting and buffering input from the network. InputCallback will then fill it's buffer from the other thread's buffer.

Hopefully this will take care of the dropouts...