#include "mem.h"
#include "wstat.h"
#include "uaudio.h"
+#include "configuration.h"
/** @brief Pipe to subprocess */
static int command_fd;
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();
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,
};
/*