From df1360b25f523437a20bddeabcfc68ffb3bde313 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 18 Nov 2020 22:04:53 +1030 Subject: [PATCH] Added volume control and mute commands. --- audio-cmd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/audio-cmd.c b/audio-cmd.c index 87e74a9..171a001 100644 --- a/audio-cmd.c +++ b/audio-cmd.c @@ -32,13 +32,19 @@ int main(int argc, char **argv) { msg.mode = strcmp(cmd, "skip") == 0; msg.stamp = strtod(argv[2], NULL); - + notify_msg_send(player, NOTIFY_PLAY_SEEK, 0, &msg); } } else if (strcmp(cmd, "next") == 0) { notify_msg_send(player, NOTIFY_PLAY_NEXT, 0, NULL); } else if (strcmp(cmd, "prev") == 0) { notify_msg_send(player, NOTIFY_PLAY_PREV, 0, NULL); + } else if (strcmp(cmd, "vol+") == 0) { + notify_msg_send(player, NOTIFY_VOLUME_UP, 0, NULL); + } else if (strcmp(cmd, "vol-") == 0) { + notify_msg_send(player, NOTIFY_VOLUME_DOWN, 0, NULL); + } else if (strcmp(cmd, "mute") == 0) { + notify_msg_send(player, NOTIFY_VOLUME_MUTE, 0, NULL); } else if (strcmp(cmd, "quit") == 0) { notify_msg_send(player, NOTIFY_QUIT, 0, NULL); } else if (strcmp(cmd, "debug") == 0) { @@ -46,12 +52,12 @@ int main(int argc, char **argv) { struct notify_debug msg; msg.func = atoi(argv[2]); - + notify_msg_send(player, NOTIFY_DEBUG, 0, &msg); } } - + notify_close(player); - + } } -- 2.39.5