X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/d0b4f0acd54eeebcde98a1b4476b232dbece6048..5bac5b78c1046bd08a39d3d18c756bbf0566c629:/server/speaker.c diff --git a/server/speaker.c b/server/speaker.c index b41c94f..b96fd5d 100644 --- a/server/speaker.c +++ b/server/speaker.c @@ -558,6 +558,14 @@ static void mainloop(void) { D(("SM_PLAY %s fd %d", t->id, t->fd)); if(t->fd == -1) error(0, "cannot play track because no connection arrived"); + /* TODO as things stand we often report this error message but then + * appear to proceed successfully. Understanding why requires a look + * at play.c: we call prepare() which makes the connection in a child + * process, and then sends the SM_PLAY in the parent process. The + * latter may well be faster. As it happens this is harmless; we'll + * just sit around sending silence until the decoder connects and + * starts sending some sample data. But is is annoying and ought to + * be fixed. */ pending_playing = t; /* If nothing is currently playing then we'll switch to the pending * track below so there's no point distinguishing the situations @@ -608,7 +616,7 @@ static void mainloop(void) { break; case SM_RELOAD: D(("SM_RELOAD")); - if(config_read(1)) + if(config_read(1, NULL)) error(0, "cannot read configuration"); info("reloaded configuration"); break; @@ -707,7 +715,7 @@ int main(int argc, char **argv) { log_default = &log_syslog; } config_uaudio_apis = uaudio_apis; - if(config_read(1)) fatal(0, "cannot read configuration"); + if(config_read(1, NULL)) fatal(0, "cannot read configuration"); /* ignore SIGPIPE */ signal(SIGPIPE, SIG_IGN); /* set nice value */