diff options
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -300,10 +300,12 @@ streamer_read_async (char *bytes, int size) { if (size == 0) { return initsize; } - else { + else { // that means EOF - bytes_until_next_song = streambuffer_fill; - pl_nextsong (0); + if (bytes_until_next_song == 0) { + bytes_until_next_song = streambuffer_fill; + pl_nextsong (0); + } break; } } @@ -347,6 +349,14 @@ streamer_get_fill (void) { } int +streamer_ok_to_read (int len) { + if (bytes_until_next_song > 0) { + return 1; + } + return streambuffer_fill >= len; +} + +int streamer_is_buffering (void) { if (streambuffer_fill < 16384) { return 1; |