diff options
author | waker <wakeroid@gmail.com> | 2009-08-18 19:36:42 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-18 19:36:42 +0200 |
commit | 9cededd13631d65ca000bab0af2e03d124cff147 (patch) | |
tree | 6bde145ea44fb4469fc522e71ef958ad19b9a7b4 /streamer.c | |
parent | 3521608a59f6264f1acf0efb69a51ee314795c0d (diff) |
mp3/cue works
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; |