From 341d226532f1b594baca67c1641275c7ea662d08 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 7 Jul 2018 12:44:47 +0200 Subject: [PATCH] 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. --- mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.39.5