playlistfs – playlist file system
implements an audio player which plays files from a built-in play list.
The player is controlled through three files, usually mounted at
The files are
for controlling play: start, stop, pause, skip, etc.;
for controlling the playout volume; and
for controlling the play list itself.
All three files can be written to control the player and read to obtain player
When read, the files report the current status of the player, volume and playlist,
respectively. End of file is indicated by a read that returns zero bytes, as usual.
However, in all three files, subsequent read operations will block until the status
of the file changes and then report the changed state. When the changed state has
been read, another end-of-file indication is given, after which another read
can be issued to wait for state changes.
file returns strings of the form ‘cmd n’
is one of
is an index (or offset) into the playlist; indices start at zero.
The commands that can be written to
take the same form; however, the index is an optional argument. If the
index is omitted, the current value is used. The commands are
starts playing at the index.
stops playing. If an index is given, the current index is set to it and
can be used in future commands.
interrupt and continue play, respectively. The index argument is always ignored and
the whole command is ignored if the state in which they occur does not
adds the argument to the current index (adds one if no argument is given)
and starts play at that index, stopping current play, if necessary.
return strings of the form
‘volume n’ ,
is a number or, if there is more than one channel, a quoted set of numbers, between 0
(minimum) and 100 (maximum).
take the same form.
file is an append-only file which accepts lines with one or two fields
per line (parsed using
The first, compulsory, field is a file name, the optional second argument
may contain a reference to, or a description of, the item, for instance in a graphical
is append-only, individual lines cannot be removed. However, the playlist
can be cleared by opening the file with the
flag. A process that has
open while the file is truncated will receive an error on the next read with
reading past eof .
When this error occurs, clients can seek to the beginning of the file and reread its contents.
After starting up,
puts itself in the background. When called with the
flag, it posts a mountable file descriptor in
flag can be used to specify a mount point other than
decoders by running
for format detection and conversion to pcm.
mountable file descriptor used by juke(7).
Volume control file