Recently Written · git

sad

sad (2f30.org simple audio daemon) with a Cygwin/OSS port on branch cygwin

git clone https://github.com/equwal/sad

Log | Files | Refs


PROTOCOL (2161 bytes)

1 Command reference
2 =================
3 
4 NOTE: All commands will return some optional output followed by OK on success or
5 ERR followed by an error message on failure.
6 
7 random
8 Select random playback mode.  By default the daemon is in a repeat mode where it cycles
9 through the playlist endlessly.
10 
11 repeat
12 Set repeat mode.  Just cycle through the playlist.
13 
14 volume 0-100
15 Set the output volume.  This is applied equally to all outputs.
16 
17 next
18 Play next song.
19 
20 pause [0|1]
21 Pause currently playing song. Toggle pause if no argument.
22 
23 play [ID]
24 Play the song with the given ID or the current song if no ID is provided.
25 
26 prev
27 Play previous song.
28 
29 stop
30 Stop playback.
31 
32 add path
33 Add the given song path to the playlist.
34 
35 clear
36 Clear playlist and stop playback.
37 
38 remove [ID]
39 Remove the song with the given ID or if ID is not given, the currently
40 selected song from the playlist.
41 
42 playlist
43 Dump the current playlist.  The output has the following form:
44 "%d: %s\n", id, filepath
45 
46 close
47 Force the daemon to close the client connection.
48 
49 kill
50 Kill the daemon.
51 
52 ping
53 The daemon will reply with pong.
54 
55 uptime
56 Number of seconds the daemon has been running.
57 
58 version
59 The sad protocol version.
60 
61 enable output
62 Enable the given output.  Every decoded buffer will be written to all
63 enabled outputs.
64 
65 disable output
66 Disable the given output.
67 
68 status [state]
69 Query state information from the daemon.  The optional argument state
70 identifies what information should be returned.  If not specified, all of the
71 state information is returned.  The format of the reply is:
72 "%s: %s\n", statevar, stateval
73 
74 Possible states:
75 	random: 1 if random mode is set 0 otherwise
76 	repeat: 1 if repeat mode is set 0 otherwise
77 	single: 1 if single mode is set 0 otherwise
78 	songid: songid of the current song stopped on or playing
79 	playback: either play, stop or pause
80 	volume: 0-100
81 	elapsed: total time elapsed within current song in seconds (not implemented)
82 	duration: total song duration in seconds (not implemented)
83 
84 wait event-name
85 Subscribe to the provided event.  When the event triggers, a reply will
86 be sent back to the client.  Events are not queued.  The reply has the form:
87 "event: %s\n", eventname