From: Andre Noll Date: Sat, 23 Mar 2019 16:42:12 +0000 (+0100) Subject: Merge branch 'refs/heads/t/mixer-fix' X-Git-Tag: v0.6.3~46 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=6bded356ec89b1344049ff702e6c6babaeccd439;hp=1746ed51956550beb3ea311d99d657221b3a8f1d Merge branch 'refs/heads/t/mixer-fix' Two bug fixes for the sleep mode of para_mixer. Started on 2018-07-07, cooking since 2018-08-19. * refs/heads/t/mixer-fix: mixer: sleep: Change to next file at fade-in time. mixer: sleep: Change to fade-in mood later. --- diff --git a/mixer.c b/mixer.c index d84f6d4e..efa42b93 100644 --- a/mixer.c +++ b/mixer.c @@ -313,7 +313,6 @@ static int com_sleep(const struct mixer *m, struct mixer_handle *h) client_cmd("stop"); if (!fit || !fi_mood) /* nothing to do */ return 1; - change_afs_mode(fi_mood); for (;;) { time(&t1); if (wake_time_epoch <= t1 + fit) @@ -324,7 +323,11 @@ static int com_sleep(const struct mixer *m, struct mixer_handle *h) (delay % 3600) / 60); sleep(delay); } - client_cmd("play"); + change_afs_mode(fi_mood); + 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;