aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputCommands.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/OutputCommands.cxx')
-rw-r--r--src/OutputCommands.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/OutputCommands.cxx b/src/OutputCommands.cxx
index 7d626477a..5e4a145da 100644
--- a/src/OutputCommands.cxx
+++ b/src/OutputCommands.cxx
@@ -65,6 +65,22 @@ handle_disableoutput(Client *client, G_GNUC_UNUSED int argc, char *argv[])
}
enum command_return
+handle_toggleoutput(Client *client, gcc_unused int argc, char *argv[])
+{
+ unsigned device;
+ if (!check_unsigned(client, &device, argv[1]))
+ return COMMAND_RETURN_ERROR;
+
+ if (!audio_output_toggle_index(device)) {
+ command_error(client, ACK_ERROR_NO_EXIST,
+ "No such audio output");
+ return COMMAND_RETURN_ERROR;
+ }
+
+ return COMMAND_RETURN_OK;
+}
+
+enum command_return
handle_devices(Client *client,
G_GNUC_UNUSED int argc, G_GNUC_UNUSED char *argv[])
{