From: Not Zed Date: Wed, 18 Nov 2020 11:34:53 +0000 (+1030) Subject: Added volume control and mute commands. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=df1360b25f523437a20bddeabcfc68ffb3bde313;p=playerz Added volume control and mute commands. --- 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); - + } }