From: Andre Noll Date: Sat, 7 Jul 2018 10:44:47 +0000 (+0200) Subject: mixer: sleep: Change to fade-in mood later. X-Git-Tag: v0.6.3~46^2~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=341d226532f1b594baca67c1641275c7ea662d08;p=paraslash.git mixer: sleep: Change to fade-in mood later. When a sleep mood is given, we currently switch to the fade-in mood too early, so that the fade-in mood rather than the sleep mood is active during sleep time. --- diff --git a/mixer.c b/mixer.c index ad674bf5..f0d5a02e 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,6 +323,7 @@ static int com_sleep(const struct mixer *m, struct mixer_handle *h) (delay % 3600) / 60); sleep(delay); } + change_afs_mode(fi_mood); client_cmd("play"); ret = fade(m, h, fiv, fit); PARA_INFO_LOG("fade complete, returning\n");