X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/ec57f6c97b41d54ade912f7e3b9f727b40e38e16..1c95530676f55d612383883ff383e24ecc7dc17d:/lib/uaudio-command.c?ds=sidebyside diff --git a/lib/uaudio-command.c b/lib/uaudio-command.c index b9a1abb..5e4531e 100644 --- a/lib/uaudio-command.c +++ b/lib/uaudio-command.c @@ -34,6 +34,7 @@ #include "mem.h" #include "wstat.h" #include "uaudio.h" +#include "configuration.h" /** @brief Pipe to subprocess */ static int command_fd; @@ -69,7 +70,7 @@ static void command_open(void) { int pfd[2]; const char *command; - if(!(command = uaudio_get("command"))) + if(!(command = uaudio_get("command", NULL))) fatal(0, "'command' not set"); xpipe(pfd); command_pid = xfork(); @@ -137,13 +138,18 @@ static void command_deactivate(void) { uaudio_thread_deactivate(); } +static void command_configure(void) { + uaudio_set("command", config->speaker_command); +} + const struct uaudio uaudio_command = { .name = "command", .options = command_options, .start = command_start, .stop = command_stop, .activate = command_activate, - .deactivate = command_deactivate + .deactivate = command_deactivate, + .configure = command_configure, }; /*