@[JAZ], OK, I've just tried
http://www.m1live.com/listen/musicone_hi.pls and in_mp3 can't connect to it either. At the moment in_mad is missing connection timeouts etc and this is why it hangs.
The buffering does need to be re-written - its been inherited from the MAD 0.14.1b plug-in. Its all included in the decoding thread loop. Basically, it does what you suggest anyway, but where and when the decoding occurs is an issue. Basically, 3 main things need to happen and they can't be done simultaneously, that is fill input buffer, decode, and maintain a full output buffer. The current decode loop goes basically like this,
1. Enter input section.
2. If file, read in to fill input buffer. If stream, read in 'metaint' bytes, process shoutcast metadata if needed, output some audio, loop to fill input buffer.
3. Enter decoding section.
4. Check if able to decode a single frame, if not enough data in input buffer goto step 1 or other problem then handle it or abort.
5. Decode a single frame.
6. Output audio data if output buffer full, until one frame has been sent or output plugin signals its full.
7. If not told to stop, loop to 4
One of the previous major problems with streaming was that when it was trying to get data from the stream, as no audio data was being sent, the output plugin would buffer underrun. This was helped by placing audio output with the data reading, though the main reason for a larger output buffer initially was gapless output (on detect of EOF, it hacks off the end of the buffer accordingly for gapless).
The reason for it downloading a chunk suddenly, then none for a while, is the process of input section downloading to fill input buffer, then the decoding and output section afterwards decoding it.
I could try to make it download continuously to re-fill the input buffer on every loop, but for file usage when I made it decode and output continuously, some people reported 99-100% CPU usage as was non-stop decoding and outputing a single audio frame. Streaming, decoding and outputing continuously might do the same thing.
I'll get round to having a proper look at it eventually.
@gameplaya15143, The LAME tag RG problem is partially to do with lame, it always marks the file as having that information - even though it hasn't (well its set to 0dB). I can make it ignore it if its 0dB, but some files could really have RG set with 0dB. I'll have a look into the LAME tag less that 24kHz samplerate issue. VBR seeking needs to be implemented, it ignores the tables in the XING tag (and the VBRI tag too).
I've been thinking of making the dialog boxes bigger, then can have more room to do the EQ editor.
Will hopefully get another update done soon addressing some of the above.