~q3cpma/mus

ref: cf29c2237d0c99e5240a55895c07564ef4635392 mus/mus_player/IPC.txt -rw-r--r-- 2.3 KiB
cf29c223q3cpma Add a #pragma once to the new xoshiro128plus.h header 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
    Command list
    ============

When mus_player's -i option is used, a UNIX domain socket is created to receive
and reply to commands. To fill the glaring hole in the POSIX toolset, the
little mus_udsend program is included to communicate with such sockets.

Here are the accepted commands and their semantics:

STATUS
    Returns a list following this format:
        status playing|paused|quitting
        path /...
        format nb_channels # sample_rate # bit_depth # bit_rate #
        duration HH:MM:SS
        position HH:MM:SS
        tag TITLE ...
        tag ARTIST ...
        tag ALBUMARTIST ...
        tag DATE ...
        tag ALBUM ...
        tag TRACKNUMBER ...
        tag TRACKTOTAL ...
        tag DISCNUMBER ...
        tag DISCTOTAL ...
        tag DISCTITLE ...
        tag REPLAYGAIN_TRACK_GAIN ...
        tag REPLAYGAIN_TRACK_PEAK ...
        tag REPLAYGAIN_ALBUM_GAIN ...
        tag REPLAYGAIN_ALBUM_PEAK ...
    tag lines will be output only for present tags.

PLAY
    Resume play if the player is paused, do nothing otherwise.

PAUSE
    Pause the player if it is playing, do nothing otherwise.

TOGGLE_PLAY_PAUSE
    Resume play if the player is paused and pause the player if it is playing.

QUIT
    Terminate the player. Can be used when paused.

TRACK_NEXT
    Skip the current track. Will cause the player to quit if used on the last
    track.

TRACK_PREV
    Play the previous song in the queue again. Will rewind the current track if
    used on the first track.

TRACK_REWIND
    Seek to the beginning of the current track.

TRACK_FIRST
    Start over from the first track.


All the commands except STATUS return the string "OK".


    Example
    =======

$ mus_player -i sock -q ~/'Music/Paradise Lost/(1991) Gothic/01. Gothic.flac' &
$ mus_udsend sock STATUS
status playing
path /home/Paul/Data/Music/Paradise Lost/(1991) Gothic/01. Gothic.flac
format nb_channels 2 bit_depth 16 sample_rate 44100 bit_rate 825k
duration 00:04:51
position 00:00:05
tag TITLE Gothic
tag ARTIST Paradise Lost
tag ALBUMARTIST Paradise Lost
tag ALBUM Gothic
tag DATE 1991
tag TRACKNUMBER 01
tag TRACKTOTAL 10
tag REPLAYGAIN_TRACK_GAIN -2.250000
tag REPLAYGAIN_TRACK_PEAK 0.788141
tag REPLAYGAIN_ALBUM_GAIN -2.100000
tag REPLAYGAIN_ALBUM_PEAK 0.999817
$ mus_udsend sock PAUSE
OK
$ mus_udsend sock PLAY
OK
$ mus_udsend sock QUIT