dtas 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gemtest +0 -0
- data/.gitignore +9 -0
- data/.rsync_doc +3 -0
- data/COPYING +674 -0
- data/Documentation/.gitignore +3 -0
- data/Documentation/GNUmakefile +46 -0
- data/Documentation/dtas-console.txt +42 -0
- data/Documentation/dtas-ctl.txt +64 -0
- data/Documentation/dtas-cueedit.txt +24 -0
- data/Documentation/dtas-enq.txt +29 -0
- data/Documentation/dtas-msinkctl.txt +45 -0
- data/Documentation/dtas-player.txt +110 -0
- data/Documentation/dtas-player_effects.txt +45 -0
- data/Documentation/dtas-player_protocol.txt +181 -0
- data/Documentation/dtas-sinkedit.txt +41 -0
- data/Documentation/dtas-sourceedit.txt +33 -0
- data/Documentation/dtas-xdelay.txt +57 -0
- data/Documentation/troubleshooting.txt +13 -0
- data/GIT-VERSION-GEN +30 -0
- data/GNUmakefile +9 -0
- data/HACKING +12 -0
- data/INSTALL +53 -0
- data/README +103 -0
- data/Rakefile +97 -0
- data/TODO +4 -0
- data/bin/dtas-console +160 -0
- data/bin/dtas-ctl +10 -0
- data/bin/dtas-cueedit +78 -0
- data/bin/dtas-enq +13 -0
- data/bin/dtas-msinkctl +51 -0
- data/bin/dtas-player +34 -0
- data/bin/dtas-sinkedit +58 -0
- data/bin/dtas-sourceedit +48 -0
- data/bin/dtas-xdelay +85 -0
- data/dtas-linux.gemspec +18 -0
- data/dtas-mpris.gemspec +16 -0
- data/examples/dtas_state.yml +18 -0
- data/lib/dtas.rb +7 -0
- data/lib/dtas/buffer.rb +90 -0
- data/lib/dtas/buffer/read_write.rb +102 -0
- data/lib/dtas/buffer/splice.rb +142 -0
- data/lib/dtas/command.rb +43 -0
- data/lib/dtas/compat_onenine.rb +18 -0
- data/lib/dtas/disclaimer.rb +18 -0
- data/lib/dtas/format.rb +151 -0
- data/lib/dtas/pipe.rb +39 -0
- data/lib/dtas/player.rb +393 -0
- data/lib/dtas/player/client_handler.rb +463 -0
- data/lib/dtas/process.rb +87 -0
- data/lib/dtas/replaygain.rb +41 -0
- data/lib/dtas/rg_state.rb +99 -0
- data/lib/dtas/serialize.rb +9 -0
- data/lib/dtas/sigevent.rb +10 -0
- data/lib/dtas/sigevent/efd.rb +20 -0
- data/lib/dtas/sigevent/pipe.rb +28 -0
- data/lib/dtas/sink.rb +121 -0
- data/lib/dtas/source.rb +147 -0
- data/lib/dtas/source/command.rb +40 -0
- data/lib/dtas/source/common.rb +14 -0
- data/lib/dtas/source/mp3.rb +37 -0
- data/lib/dtas/state_file.rb +33 -0
- data/lib/dtas/unix_accepted.rb +76 -0
- data/lib/dtas/unix_client.rb +51 -0
- data/lib/dtas/unix_server.rb +110 -0
- data/lib/dtas/util.rb +15 -0
- data/lib/dtas/writable_iter.rb +22 -0
- data/perl/dtas-graph +129 -0
- data/pkg.mk +26 -0
- data/setup.rb +1586 -0
- data/test/covshow.rb +30 -0
- data/test/helper.rb +76 -0
- data/test/player_integration.rb +121 -0
- data/test/test_buffer.rb +216 -0
- data/test/test_format.rb +61 -0
- data/test/test_format_change.rb +49 -0
- data/test/test_player.rb +47 -0
- data/test/test_player_client_handler.rb +86 -0
- data/test/test_player_integration.rb +220 -0
- data/test/test_rg_integration.rb +117 -0
- data/test/test_rg_state.rb +32 -0
- data/test/test_sink.rb +32 -0
- data/test/test_sink_tee_integration.rb +34 -0
- data/test/test_source.rb +102 -0
- data/test/test_unixserver.rb +66 -0
- data/test/test_util.rb +15 -0
- metadata +208 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
all::
|
2
|
+
|
3
|
+
PANDOC = pandoc
|
4
|
+
PANDOC_OPTS = -f markdown --email-obfuscation=none
|
5
|
+
pandoc = $(PANDOC) $(PANDOC_OPTS)
|
6
|
+
|
7
|
+
ones =
|
8
|
+
ones += dtas-console
|
9
|
+
ones += dtas-ctl
|
10
|
+
ones += dtas-enq
|
11
|
+
ones += dtas-msinkctl
|
12
|
+
ones += dtas-player
|
13
|
+
ones += dtas-xdelay
|
14
|
+
ones += dtas-sinkedit
|
15
|
+
ones += dtas-sourceedit
|
16
|
+
|
17
|
+
man1 := $(addsuffix .1, $(ones))
|
18
|
+
man7 := $(addsuffix .7,dtas-player_protocol)
|
19
|
+
|
20
|
+
all:: man
|
21
|
+
|
22
|
+
man: $(man1) $(man7)
|
23
|
+
|
24
|
+
prefix?=$(HOME)
|
25
|
+
mandir?=$(prefix)/share/man
|
26
|
+
man1dir=$(mandir)/man1
|
27
|
+
man5dir=$(mandir)/man5
|
28
|
+
man7dir=$(mandir)/man7
|
29
|
+
|
30
|
+
INSTALL = install
|
31
|
+
|
32
|
+
gem-man: man
|
33
|
+
$(INSTALL) -d -m 755 ../man
|
34
|
+
$(INSTALL) -m 644 $(man1) ../man
|
35
|
+
$(INSTALL) -m 644 $(man7) ../man
|
36
|
+
|
37
|
+
install-man: man
|
38
|
+
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
|
39
|
+
$(INSTALL) -d -m 755 $(DESTDIR)$(man7dir)
|
40
|
+
$(INSTALL) -m 644 $(man1) $(DESTDIR)$(man1dir)
|
41
|
+
$(INSTALL) -m 644 $(man7) $(DESTDIR)$(man7dir)
|
42
|
+
%.1 %.7 : %.txt
|
43
|
+
$(pandoc) -s -t man < $< > $@+ && mv $@+ $@
|
44
|
+
|
45
|
+
clean::
|
46
|
+
$(RM) $(man1) $(man7)
|
@@ -0,0 +1,42 @@
|
|
1
|
+
% dtas-console(1) dtas user manual
|
2
|
+
|
3
|
+
# NAME
|
4
|
+
|
5
|
+
dtas-console - rudimentary curses console client for dtas-player
|
6
|
+
|
7
|
+
# SYNOPSIS
|
8
|
+
|
9
|
+
dtas-console
|
10
|
+
|
11
|
+
# DESCRIPTION
|
12
|
+
|
13
|
+
dtas-console displays the elapsed decoder time of the track, which can be
|
14
|
+
used as an approximation of the current playback time of a track.
|
15
|
+
|
16
|
+
It cannot display an accurate playback time due to variable buffering
|
17
|
+
in the sinks and pipes.
|
18
|
+
|
19
|
+
See dtas-player_protocol(7) for a detailed description of the protocol.
|
20
|
+
|
21
|
+
# KEYBOARD CONTROL
|
22
|
+
|
23
|
+
Key bindings are inspired partially by mplayer(1)
|
24
|
+
|
25
|
+
- 'j'/'k' - seek backward/forward 5 seconds
|
26
|
+
- LEFT/RIGHT - seek backward/forward 10 seconds
|
27
|
+
- UP/DOWN - seek forward/backward 1 minute
|
28
|
+
- PGUP/PGDWN - seek forward/backward 10 minutes
|
29
|
+
- SPACE - toggle play/pause state of the playback
|
30
|
+
- 'p'/'P' - decrease/increase timer resolution
|
31
|
+
- BACKSPACE - seek to the beginning of the track
|
32
|
+
- Ctrl-C - exit dtas-console
|
33
|
+
|
34
|
+
# ENVIRONMENT
|
35
|
+
|
36
|
+
DTAS_PLAYER_SOCK - the path to the dtas-player control socket.
|
37
|
+
This defaults to ~/.dtas/player.sock
|
38
|
+
|
39
|
+
# SEE ALSO
|
40
|
+
|
41
|
+
dtas-player(1), dtas-player_protocol(7), dtas-ctl(1), dtas-sinkedit(1),
|
42
|
+
dtas-sourceedit(1)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
% dtas-ctl(1) dtas user manual
|
2
|
+
%
|
3
|
+
|
4
|
+
# NAME
|
5
|
+
|
6
|
+
dtas-ctl - low-level client for dtas-player
|
7
|
+
|
8
|
+
# SYNOPSYS
|
9
|
+
|
10
|
+
dtas-ctl [ARGS...]
|
11
|
+
|
12
|
+
# DESCRIPTION
|
13
|
+
|
14
|
+
dtas-ctl passes command-line arguments as-is to dtas-player. It is mainly
|
15
|
+
useful for simple commands such as ("current", "play_pause", "pause", "play",
|
16
|
+
"rg RGARGS", "seek HH:MM:SS", "skip").
|
17
|
+
|
18
|
+
See dtas-player_protocol(7) for a detailed description of the protocol.
|
19
|
+
|
20
|
+
# EXAMPLES
|
21
|
+
|
22
|
+
display the currently playing track
|
23
|
+
|
24
|
+
$ dtas-ctl current
|
25
|
+
|
26
|
+
enqueue a file for playback (dtas-enq(1) is easier to use, here)
|
27
|
+
|
28
|
+
$ dtas-ctl enq /absolute/path/to/file
|
29
|
+
|
30
|
+
toggle the play/pause state of the player
|
31
|
+
|
32
|
+
$ dtas-ctl play_pause
|
33
|
+
|
34
|
+
change the ReplayGain mode
|
35
|
+
|
36
|
+
$ dtas-ctl rg mode=album_gain
|
37
|
+
# "track_gain", "off" may be used, too
|
38
|
+
|
39
|
+
seek 5 seconds forward
|
40
|
+
|
41
|
+
$ dtas-ctl seek +5
|
42
|
+
|
43
|
+
seek to an absolute position
|
44
|
+
|
45
|
+
$ dtas-ctl seek 1:00
|
46
|
+
|
47
|
+
skip to the next track
|
48
|
+
|
49
|
+
$ dtas-ctl skip
|
50
|
+
|
51
|
+
To play the output of an arbitrary command (note the quotes) and usage
|
52
|
+
of $SOXFMT (see dtas-player_protocol(7)).
|
53
|
+
|
54
|
+
$ dtas-ctl enq-cmd 'sox -n $SOXFMT - synth 3 pluck'
|
55
|
+
|
56
|
+
# ENVIRONMENT
|
57
|
+
|
58
|
+
DTAS_PLAYER_SOCK - the path to the dtas-player control socket.
|
59
|
+
This defaults to ~/.dtas/player.sock
|
60
|
+
|
61
|
+
# SEE ALSO
|
62
|
+
|
63
|
+
dtas-player(1), dtas-player_protocol(7), dtas-enq(1), dtas-sinkedit(1),
|
64
|
+
dtas-sourceedit(1)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
% dtas-cueedit(1) dtas user manual
|
2
|
+
%
|
3
|
+
|
4
|
+
# NAME
|
5
|
+
|
6
|
+
dtas-cueedit - edit embedded cuesheets in audio files
|
7
|
+
|
8
|
+
# SYNOPSYS
|
9
|
+
|
10
|
+
dtas-cueedit /path/to/audio.flac
|
11
|
+
|
12
|
+
# DESCRIPTION
|
13
|
+
|
14
|
+
dtas-cueedit spawns an editor to edit the embedded cuesheet in FLAC files.
|
15
|
+
In the future, other audio formats with embedded cuesheets may be supported.
|
16
|
+
Use with the metaflac(1) is required.
|
17
|
+
|
18
|
+
# ENVIRONMENT
|
19
|
+
|
20
|
+
VISUAL / EDITOR - your favorite *nix text editor, defaults to 'vi' if unset.
|
21
|
+
|
22
|
+
# SEE ALSO
|
23
|
+
|
24
|
+
metaflac(1)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
% dtas-enq(1) dtas user manual
|
2
|
+
%
|
3
|
+
|
4
|
+
# NAME
|
5
|
+
|
6
|
+
dtas-enq - enqueue audio files for playback with dtas-player
|
7
|
+
|
8
|
+
# SYNOPSYS
|
9
|
+
|
10
|
+
dtas-enq [FILE...]
|
11
|
+
|
12
|
+
# DESCRIPTION
|
13
|
+
|
14
|
+
dtas-enq will enqueue a list of files given on the command-line to a
|
15
|
+
running instance of dtas-player(1). dtas-player will start playing the
|
16
|
+
newly enqueued files in the order given.
|
17
|
+
|
18
|
+
# EXAMPLE
|
19
|
+
|
20
|
+
$ dtas-enq /path/to/your/favorite/album/*.flac
|
21
|
+
|
22
|
+
# ENVIRONMENT
|
23
|
+
|
24
|
+
DTAS_PLAYER_SOCK - the path to the dtas-player listen socket.
|
25
|
+
This defaults to ~/.dtas/player.sock
|
26
|
+
|
27
|
+
# SEE ALSO
|
28
|
+
|
29
|
+
dtas-player(1), dtas-ctl(1)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
% dtas-msinkctl(1) dtas user manual
|
2
|
+
|
3
|
+
# NAME
|
4
|
+
|
5
|
+
dtas-msinkctl - activate/deactivate multiple sinks at once
|
6
|
+
|
7
|
+
# SYNOPSYS
|
8
|
+
|
9
|
+
dtas-msinkctl COMMAND
|
10
|
+
dtas-msinkctl COMMAND [SINKS...]
|
11
|
+
|
12
|
+
# DESCRIPTION
|
13
|
+
|
14
|
+
dtas-msinkctl is useful for activating/deactivating multiple sinks.
|
15
|
+
|
16
|
+
# EXAMPLES
|
17
|
+
|
18
|
+
Display only active sinks (unlike "dtas-ctl sink ls", which shows all sinks)
|
19
|
+
|
20
|
+
dtas-msinkctl active
|
21
|
+
|
22
|
+
Display only non-blocking sinks
|
23
|
+
|
24
|
+
dtas-msinkctl nonblock
|
25
|
+
|
26
|
+
Enable only SINK1 and SINK3, and close other sinks
|
27
|
+
|
28
|
+
dtas-msinkctl active-set SINK1 SINK3
|
29
|
+
|
30
|
+
Add the default sink to the active set
|
31
|
+
|
32
|
+
dtas-msinkctl active-add default
|
33
|
+
|
34
|
+
Remove SINK3 from the active set
|
35
|
+
|
36
|
+
dtas-msinkctl active-add SINK3
|
37
|
+
|
38
|
+
# ENVIRONMENT
|
39
|
+
|
40
|
+
DTAS_PLAYER_SOCK - the path to the dtas-player control socket.
|
41
|
+
This defaults to ~/.dtas/player.sock
|
42
|
+
|
43
|
+
# SEE ALSO
|
44
|
+
|
45
|
+
dtas-player(1), dtas-player_protocol(7), dtas-ctl(1), dtas-sinkedit(1)
|
@@ -0,0 +1,110 @@
|
|
1
|
+
% dtas-player(1) dtas user manual
|
2
|
+
%
|
3
|
+
|
4
|
+
# NAME
|
5
|
+
|
6
|
+
dtas-player - playback process for dtas
|
7
|
+
|
8
|
+
# SYNOPSYS
|
9
|
+
|
10
|
+
dtas-player
|
11
|
+
|
12
|
+
# DESCRIPTION
|
13
|
+
|
14
|
+
dtas-player is intended as a music player, but implemented as Unix
|
15
|
+
process and pipeline manager, so it may run arbitrary commands and route
|
16
|
+
data to just about any process.
|
17
|
+
|
18
|
+
dtas-player is currently only queue-based, enqueued tracks are played
|
19
|
+
only once. It only runs in a foreground console, so usage with
|
20
|
+
screen(1) or tmux(1) is recommended.
|
21
|
+
|
22
|
+
By default, dtas-player uses the sox(1) command to decode audio, and
|
23
|
+
pipes the data to a play(1) process (also distributed with sox). It may
|
24
|
+
be configured to output to multiple/arbitrary processes, and may invoke
|
25
|
+
arbitrary commands for outputting audio (or any other data).
|
26
|
+
|
27
|
+
dtas-player is controlled by a Unix socket, see dtas-player_protocol(7)
|
28
|
+
for details. Given the power of dtas-player to run arbitrary commands,
|
29
|
+
this socket is created with restricted permissions and is only
|
30
|
+
accessible by the user who invoked dtas-player.
|
31
|
+
|
32
|
+
dtas-player maintains state across restarts with a state file.
|
33
|
+
|
34
|
+
# EXAMPLE
|
35
|
+
|
36
|
+
Starting dtas-player is easy, it takes no arguments:
|
37
|
+
|
38
|
+
$ dtas-player
|
39
|
+
|
40
|
+
In a different terminal, enqueue your favorite track for playback:
|
41
|
+
|
42
|
+
$ dtas-enq /path/to/your/favorite/music.flac
|
43
|
+
|
44
|
+
In the terminal running dtas-player, some diagnostic information
|
45
|
+
should be printed, as will any errors which occur.
|
46
|
+
|
47
|
+
To see information about the currently playing track in YAML:
|
48
|
+
|
49
|
+
$ dtas-ctl current
|
50
|
+
|
51
|
+
As you should be able to see, a "default" sink is automatically
|
52
|
+
created and playing the audio.
|
53
|
+
|
54
|
+
# TROUBLESHOOTING
|
55
|
+
|
56
|
+
The most common problem with dtas-player is the play(1) command
|
57
|
+
(distributed with SoX) not using the correct audio device. Ensuring the
|
58
|
+
play(1) command works with dtas-player is important. See the play(1)
|
59
|
+
documentation for details.
|
60
|
+
|
61
|
+
Once you find the correct AUDIODEV/AUDIODRIVER environment variables,
|
62
|
+
you may set them via dtas-ctl(1):
|
63
|
+
|
64
|
+
To play audio on my favorite USB DAC directly to ALSA, I use:
|
65
|
+
|
66
|
+
$ dtas-ctl sink ed default env.AUDIODEV=hw:DAC env.AUDIODRIVER=alsa
|
67
|
+
|
68
|
+
# ADVANCED EXAMPLES
|
69
|
+
|
70
|
+
To configure a dumper sink (in addition to the "default" sink). Note
|
71
|
+
the use of $SOXFMT, this will be automatically expanded to match the
|
72
|
+
internal format of the player. The internal format of the player is
|
73
|
+
described in dtas-player_protocol(7).
|
74
|
+
|
75
|
+
$ dtas-ctl sink ed dumper command='sox $SOXFMT - /tmp/dump.sox'
|
76
|
+
|
77
|
+
Non-"default" sinks are not active by default, but may be made active.
|
78
|
+
|
79
|
+
$ dtas-ctl sink ed dumper active=true
|
80
|
+
|
81
|
+
Changing it again to "active=false" will deactivate the sink.
|
82
|
+
|
83
|
+
# ENVIRONMENT
|
84
|
+
|
85
|
+
DTAS_PLAYER_SOCK - the path to the dtas-player listen socket.
|
86
|
+
This defaults to ~/.dtas/player.sock
|
87
|
+
|
88
|
+
DTAS_PLAYER_STATE - the state file of the dtas-player
|
89
|
+
This defaults to ~/.dtas/player_state.yml
|
90
|
+
|
91
|
+
dtas-player will automatically populate $SOXFMT and $ECAFMT when
|
92
|
+
invoking sink and source commands.
|
93
|
+
|
94
|
+
ReplayGain values are also exported to the source command if they
|
95
|
+
exist in the source file:
|
96
|
+
|
97
|
+
* REPLAYGAIN_TRACK_GAIN
|
98
|
+
* REPLAYGAIN_ALBUM_GAIN
|
99
|
+
* REPLAYGAIN_ALBUM_PEAK
|
100
|
+
* REPLAYGAIN_TRACK_PEAK
|
101
|
+
|
102
|
+
# FILES
|
103
|
+
|
104
|
+
~/.dtas/player_state.yml is a human-readable YAML file used to preserve
|
105
|
+
state across restarts of dtas-player.
|
106
|
+
|
107
|
+
# SEE ALSO
|
108
|
+
|
109
|
+
dtas-player_protocol(7), dtas-ctl(1), dtas-enq(1), dtas-sourceedit(1),
|
110
|
+
dtas-sinkedit(1), sox(1), play(1), screen(1), tmux(1)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
Effects in dtas-player may be applied either at the source or the sink.
|
2
|
+
They are applied in the order described.
|
3
|
+
|
4
|
+
1. source effects
|
5
|
+
|
6
|
+
Source effects are effects which should be applied per-source and do not
|
7
|
+
rely on inter-track information.
|
8
|
+
|
9
|
+
Examples include:
|
10
|
+
- ReplayGain (simple vol/gain changes)
|
11
|
+
- anything which does not change the length of the audio:
|
12
|
+
vol, stereo, highpass, lowpass, loudness, bass, treble, equalizer, ...
|
13
|
+
|
14
|
+
Modifying source effects should introduce no extra gaps in playback.
|
15
|
+
Effects which modify the length of the audio is not recommended here,
|
16
|
+
as seek functionality will be impaired.
|
17
|
+
|
18
|
+
2. sink effects
|
19
|
+
|
20
|
+
Sink effects are any effects which:
|
21
|
+
|
22
|
+
1) should only be applied to a specific sink
|
23
|
+
2) effects which require inter-track information
|
24
|
+
(multiband delays/compressors/expanders)
|
25
|
+
3) alter the length of the audio
|
26
|
+
|
27
|
+
In a multi-zone audio system (where each zone has its own sink), sink
|
28
|
+
effects may also customize the sound of a certain zone while not
|
29
|
+
affecting others.
|
30
|
+
|
31
|
+
Examples include:
|
32
|
+
- equalizer effects (highpass/bass/treble/equalizer)
|
33
|
+
- loudness
|
34
|
+
- delaying a certain channel or frequency range for time-alignment
|
35
|
+
- compressors/limiters
|
36
|
+
- reverb
|
37
|
+
- vol
|
38
|
+
- remix (for stereo image adjustments)
|
39
|
+
|
40
|
+
Additionally, effects which are necessary due to the limitation of the
|
41
|
+
playback hardware are applied at the sink:
|
42
|
+
|
43
|
+
- rate
|
44
|
+
- dither
|
45
|
+
- remix (static channel mappings)
|
@@ -0,0 +1,181 @@
|
|
1
|
+
% dtas-player_protocol(7) dtas user manual
|
2
|
+
%
|
3
|
+
|
4
|
+
# NAME
|
5
|
+
|
6
|
+
dtas-player_protocol - protocol for controling dtas-player
|
7
|
+
|
8
|
+
# DESCRIPTION
|
9
|
+
|
10
|
+
This gives a specification of the dtas-player protocol over a local Unix
|
11
|
+
SOCK_SEQPACKET or SOCK_DGRAM socket. The dtas-player protocol should NOT be
|
12
|
+
considered stable at this point and compatibility will break.
|
13
|
+
|
14
|
+
Inspiration is taken from MPRIS and MPRIS 2.0 specifications (e.g.
|
15
|
+
play_pause, play, pause), and there will be a proxy in the future to
|
16
|
+
support MPRIS/MPRIS 2.0 clients.
|
17
|
+
|
18
|
+
The DTAS_PLAYER_SOCK is the standard environment determining the control
|
19
|
+
socket for dtas-player(1). This defaults to $HOME/.dtas/player.sock if
|
20
|
+
unset.
|
21
|
+
|
22
|
+
Most low-level commands may be issued using the dtas-ctl(1) command.
|
23
|
+
|
24
|
+
Higher-level commands such as dtas-console(1), dtas-sourceedit(1),
|
25
|
+
dtas-sinkedit(1), and dtas-enq(1) also implement this protocol.
|
26
|
+
|
27
|
+
# ARGUMENT TYPES
|
28
|
+
|
29
|
+
- BOOLEAN - must be "true" or "false"
|
30
|
+
- INTEGER - a signed integer in decimal notation (base 10)
|
31
|
+
- UNSIGNED - an unsigned integer in decimal or hex notation
|
32
|
+
- ENVNAME - must be a suitable environment variable (setenv(3))
|
33
|
+
- ENVVALUE - must be a suitable environment variable (setenv(3))
|
34
|
+
- COMMAND, this may be quoted string passed to sh -c "",
|
35
|
+
variable/argument expansion will be performed by the shell
|
36
|
+
- FILENAME - an expanded pathname relative to / is recommended since
|
37
|
+
dtas-player and the client may run in different directories
|
38
|
+
|
39
|
+
# VARIABLE EXPANSION
|
40
|
+
|
41
|
+
For source and sink "command" arguments, the $SOXFMT and $ECAFMT
|
42
|
+
environment variables are exported automatically to source to ease
|
43
|
+
integration with sox(1) and ecasound(1).
|
44
|
+
|
45
|
+
Both $SOXFMT and $ECAFMT are based on the configured "format" of
|
46
|
+
the dtas-player (see below).
|
47
|
+
|
48
|
+
For all machines, $SOXFMT defaults to: -ts32 -c2 -r44100
|
49
|
+
For little-endian machines, $ECAFMT defaults to: -fs32_le,2,44100
|
50
|
+
|
51
|
+
# COMMANDS
|
52
|
+
|
53
|
+
* cd - change the current working directory of the player
|
54
|
+
|
55
|
+
* clear - clear current queue (current track/command continues running)
|
56
|
+
PENDING: this may be renamed to "queue clear" or "queue-clear"
|
57
|
+
|
58
|
+
* current - output information about the currently-playing track/command
|
59
|
+
in YAML. The structure of this is unstable and subject to change.
|
60
|
+
|
61
|
+
* enq FILENAME - enqueue the given FILENAME for playback
|
62
|
+
An expanded (full) pathname relative to '/' is recommended, as
|
63
|
+
dtas-player and the client may be in different directories.
|
64
|
+
PENDING: this may be renamed to "queue add"
|
65
|
+
|
66
|
+
* enq-cmd "COMMAND" - run the following command for playback.
|
67
|
+
The COMMAND is expected to output audio in the audio format matching
|
68
|
+
the current audio format of the player. This may be a shell pipeline
|
69
|
+
and include multiple commands. The $SOXFMT and $ECAFMT variables are
|
70
|
+
available here.
|
71
|
+
PENDING: this may be renamed to "queue add-cmd"
|
72
|
+
|
73
|
+
* env ENVTOSET=ENVVALUE ENVTOSET2=ENVVALUE2
|
74
|
+
Set environment variables. This affects all future source/sink
|
75
|
+
processes as well as helper commands dtas-player may spawn
|
76
|
+
(e.g. soxi(1)). Environment variables set this way are currently not
|
77
|
+
preserved across invocations of dtas-player(1), but may change in the
|
78
|
+
future.
|
79
|
+
|
80
|
+
* env ENVTOUNSET1# ENVTOUNSET#
|
81
|
+
Unset the given environment variable.
|
82
|
+
PENDING: the '#' is ugly and inconsistent with the per-sink/source.
|
83
|
+
env.
|
84
|
+
|
85
|
+
* format FORMATARGS - configure the format between source and sink
|
86
|
+
Changing this will affect the $SOXFMT and $ECAFMT environments passed
|
87
|
+
to source and sink commands. Changing this implies a "restart"
|
88
|
+
Changing rate to 48000 is probably useful if you plan on playing to some
|
89
|
+
laptop sound cards.
|
90
|
+
|
91
|
+
+ channels=UNSIGNED - (default: 2 (stereo)) - number of channels
|
92
|
+
to use internally. sox will internally invoke the remix effect
|
93
|
+
when decoding.
|
94
|
+
+ endian=(big|little|swap) - (default: native) - there is probably no
|
95
|
+
point in changing this unless you output over a network sink to
|
96
|
+
a machine of different endianess.
|
97
|
+
+ bits=UNSIGNED - (default: implied from type) - sample precision (decoded)
|
98
|
+
This may be pointless and removed in the future, since the sample
|
99
|
+
precision is implied from type.
|
100
|
+
+ rate=UNSIGNED - (default: 44100) - sample rate of audio
|
101
|
+
Typical values of rate are 44100, 48000, 88200, 96000. Not all
|
102
|
+
DSP effects are compatible with all sampling rates/channels.
|
103
|
+
+ type=(s16|s24|s32|u16|u24|u32|f32|f64) - (default: s32)
|
104
|
+
change the raw PCM format. s32 currently offers the best performance
|
105
|
+
when only sox/play are used. f32 may offer better performance if
|
106
|
+
piping to/from non-sox applications (e.g. ecasound)
|
107
|
+
|
108
|
+
* pause - pause playback
|
109
|
+
Player pause state is preserved across dtas-player invocations.
|
110
|
+
|
111
|
+
* play - restart playback from pause. Playback sinks will yield
|
112
|
+
control of the audio playback device once no source is playing.
|
113
|
+
|
114
|
+
* play_pause - toggle the play/pause state. This starts playback if
|
115
|
+
paused, and pauses playback if playing.
|
116
|
+
|
117
|
+
* restart - restarts all processes in the current pipeline. Playback
|
118
|
+
will be momentarily interrupted while this change occurs. This is
|
119
|
+
necessary if one of the commands (e.g. sox or ecasound) or loaded
|
120
|
+
libraries (e.g. a LADSPA plugin) is upgraded.
|
121
|
+
|
122
|
+
* rg RGARGS - configure ReplayGain support
|
123
|
+
All FLOAT values may be adjusted via '+=' or '-=' instead of simple
|
124
|
+
assignment ('='). If RGARGS is empty, the current rg state of
|
125
|
+
non-default values will be dumped in YAML.
|
126
|
+
+ fallback_gain=FLOAT (-6.0) - dB value
|
127
|
+
Adjust the volume by this level (usually negative) for tracks
|
128
|
+
missing ReplayGain tags. This is useful when the queue contains
|
129
|
+
a mix of tracks with and without ReplayGain tags.
|
130
|
+
+ fallback_track=BOOLEAN (true)
|
131
|
+
When in album_gain mode, fallback to track_gain if the
|
132
|
+
REPLAYGAIN_ALBUM_GAIN metadata is missing.
|
133
|
+
+ mode=(album_gain|track_gain|track_norm|album_norm|off)
|
134
|
+
This controls the ReplayGain tag to use. The *_norm options
|
135
|
+
are used for peak normalization and not commonly found in other
|
136
|
+
players.
|
137
|
+
+ preamp=FLOAT (0) - dB value
|
138
|
+
Adjust the album_gain or track_gain amount by this value (in dB).
|
139
|
+
+ norm_level=FLOAT (1.0 == dBFS)
|
140
|
+
Controls the level to normalize to when using album_norm or track_norm.
|
141
|
+
|
142
|
+
* seek [+-]HH:MM:SS.FRAC - seek the current track to a specified time.
|
143
|
+
This is passed directly as the first argument for the sox(1) "trim"
|
144
|
+
command. See the sox(1) manpage for details.
|
145
|
+
Seeking to a relative time is also supported by prefixing the time
|
146
|
+
with '+' or '-'
|
147
|
+
|
148
|
+
* skip - abort current track/command (via closing the output pipe)
|
149
|
+
Running the "clear" command before this will abort playback.
|
150
|
+
|
151
|
+
* sink ls - list names of current sinks
|
152
|
+
|
153
|
+
* sink cat SINKNAME - dump SINKNAME config in YAML
|
154
|
+
|
155
|
+
* sink rm SINKNAME - remove SINKNAME
|
156
|
+
|
157
|
+
* sink ed SINKNAME SINKARGS - create/edit SINKNAME
|
158
|
+
This currently does not restart running (active) sinks.
|
159
|
+
This will stop active sinks if active is set to false, and start
|
160
|
+
active sinks if active is set to true.
|
161
|
+
See dtas-sinkedit(1) for an example of using this.
|
162
|
+
+ command=COMMAND - change the command-line used for playback
|
163
|
+
+ active=BOOLEAN - whether or not the sink will be in use (default: false)
|
164
|
+
+ env.ENVNAME=ENVVALUE - set ENVNAME to ENVVALUE for the sink process
|
165
|
+
+ env#ENVNAME - unset ENVNAME in the sink process (only)
|
166
|
+
+ prio=INTEGER - priority of the sink, lower values run first
|
167
|
+
+ nonblock=BOOLEAN - drop audio data to avoid holding back other sinks
|
168
|
+
+ pipe_size=UNSIGNED - set the size of the pipe for the sink (Linux-only)
|
169
|
+
|
170
|
+
* source cat - dump the current source command and env in YAML
|
171
|
+
|
172
|
+
* source ed SOURCEARGS - edit the source (decoder) command and environment.
|
173
|
+
This changes here will immediately restart the source process.
|
174
|
+
See the code for dtas-sourceedit(1) for an example of using this.
|
175
|
+
+ command=COMMAND - change the command-line used to decode audio
|
176
|
+
+ env.ENVNAME=ENVVALUE - set ENVNAME to ENVVALUE for the source process
|
177
|
+
+ env#ENVNAME - unset ENVNAME in the source process (only)
|
178
|
+
|
179
|
+
* watch - adds the client to the passive watch list for notifications.
|
180
|
+
It is recommended clients issue no further commands and open
|
181
|
+
another client socket to issue non-watch commands.
|