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.
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)
(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;