This is the default if
.B speaker_command
is specified, or if no native is available.
+.IP
+You might want to set
+.B pause_mode
+with this backend.
.TP
.B rtp
Transmit audio over the network.
tracks.
The default is 31.
.TP
+.B pause_mode \fIMODE
+Sets the pause mode for the \fBcommand\fR backend.
+The possible values are:
+.RS
+.TP
+.B silence
+Send silent (0-value) samples when paused.
+This is the default.
+.TP
+.B suspend
+Stop writing when paused.
+.RE
+.TP
.B player \fIPATTERN\fR \fIMODULE\fR [\fIOPTIONS.. [\fB\-\-\fR]] \fIARGS\fR...
Specifies the player for files matching the glob \fIPATTERN\fR.
\fIMODULE\fR specifies which plugin module to use.
return 0;
}
+static int validate_pausemode(const struct config_state attribute((unused)) *cs,
+ int nvec,
+ char **vec) {
+ if(nvec == 1 && (!strcmp(vec[0], "silence") || !strcmp(vec[0], "suspend")))
+ return 0;
+ error(0, "%s:%d: invalid pause mode", cs->path, cs->line);
+ return -1;
+}
+
/** @brief Item name and and offset */
#define C(x) #x, offsetof(struct config, x)
/** @brief Item name and and offset */
{ C(nice_speaker), &type_integer, validate_any },
{ C(noticed_history), &type_integer, validate_positive },
{ C(password), &type_string, validate_any },
+ { C(pause_mode), &type_string, validate_pausemode },
{ C(player), &type_stringlist_accum, validate_player },
{ C(plugins), &type_string_accum, validate_isdir },
{ C(prefsync), &type_integer, validate_positive },
/** @brief Command execute by speaker to play audio */
const char *speaker_command;
+ /** @brief Pause mode for command backend */
+ const char *pause_mode;
+
/** @brief Target sample format */
struct stream_header sample_format;
static void command_configure(void) {
uaudio_set("command", config->speaker_command);
+ uaudio_set("pause-mode", config->pause_mode);
}
const struct uaudio uaudio_command = {