Added volume control and mute commands.
authorNot Zed <notzed@gmail.com>
Wed, 18 Nov 2020 11:34:53 +0000 (22:04 +1030)
committerNot Zed <notzed@gmail.com>
Wed, 18 Nov 2020 11:34:53 +0000 (22:04 +1030)
audio-cmd.c

index 87e74a9..171a001 100644 (file)
@@ -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);
-                       
+
        }
 }