diff options
author | waker <wakeroid@gmail.com> | 2009-08-11 21:46:09 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2009-08-11 21:46:09 +0200 |
commit | b338d34b68b138f05b2f2ef6feef2df9d08d61bd (patch) | |
tree | 3385ea40ad5722f3c9c6f693db2eaaa7e6612ae0 /streamer.c | |
parent | 245463dbe00a95e3c1ba3d841e31a63509883915 (diff) |
better handling of "end of playlist"
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -27,6 +27,8 @@ #include "common.h" #include "streamer.h" #include "playback.h" +#include "messagepump.h" +#include "messages.h" static SRC_STATE *src; static SRC_DATA srcdata; @@ -83,6 +85,16 @@ streamer_thread (uintptr_t ctx) { p_pause (); } } + else if (nextsong == -2) { + nextsong = -1; + p_stop (); + messagepump_push (M_SONGCHANGED, 0, pl_get_idx_of (playlist_current_ptr), -1); + continue; + } + else if (p_isstopped ()) { + usleep (3000); + continue; + } streamer_lock (); if (streambuffer_fill < STREAM_BUFFER_SIZE) { int sz = STREAM_BUFFER_SIZE - streambuffer_fill; |