From: Andre Noll Date: Sat, 11 Aug 2018 14:01:51 +0000 (+0200) Subject: mixer: sleep: Change to next file at fade-in time. X-Git-Tag: v0.6.3~46^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=176d4e57f7381f6215f2baf3b07f859bb4c72e76 mixer: sleep: Change to next file at fade-in time. If a sleep mood is given, we currently start fading in with the current file of the sleep mood still playing. It might therefore take a long time until the first file of the fade-in mood is started. This patch avoids this problem by running "para client next" at fade-in time right after the mood has been changed to the fade-in mood. --- diff --git a/mixer.c b/mixer.c index f0d5a02e..4ceaba9c 100644 --- 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;