mixer: sleep: Change to next file at fade-in time.
[paraslash.git] / mixer.c
diff --git a/mixer.c b/mixer.c
index f0d5a02..4ceaba9 100644 (file)
--- a/mixer.c
+++ b/mixer.c
@@ -324,7 +324,10 @@ static int com_sleep(const struct mixer *m, struct mixer_handle *h)
                sleep(delay);
        }
        change_afs_mode(fi_mood);
-       client_cmd("play");
+       if (sleep_mood) /* currently playing */
+               client_cmd("next");
+       else /* currently stopped */
+               client_cmd("play");
        ret = fade(m, h, fiv, fit);
        PARA_INFO_LOG("fade complete, returning\n");
        return ret;