A simple command-line interface for playing audio files.

kd 9ed72a6c87 Ignore SIGPIPE 2 years ago
LICENSE 3f24ebee09 Change LICENSE to 0BSD 3 years ago
Makefile 6f066278f8 Recreate the repository 3 years ago
README 9a37db63e2 Update the README 2 years ago
auplayer.1 738276b19b Add a testing mode to the `-c' option 2 years ago
auplayer.c 9ed72a6c87 Ignore SIGPIPE 2 years ago
playlist.c 6f066278f8 Recreate the repository 3 years ago
playlist.h 6f066278f8 Recreate the repository 3 years ago
util.c 6f066278f8 Recreate the repository 3 years ago
util.h 6f066278f8 Recreate the repository 3 years ago

README

NAME
auplayer – a CLI for playing audio files

SYNOPSIS
auplayer [-lprsv] [-F file-descriptor] [-I file-descriptor]
[-b buffer-size] [-c command] [-d device] [-f file-list]
[-g file-list] [-h history-size] [-i input-file] arg ...

DESCRIPTION
auplayer provides a simple command-line interface for playing audio
files.

The arguments are as follows:

-F file-descriptor
Add lines read from file-descriptor to the playlist as below,
removing leading & trailing white-space.

-I file-descriptor
Read commands from file-descriptor instead of the standard input.

-b buffer-size
Specify the buffer size for auopen(1).
Additionally, append "-b buffer-size" to the end of the shell
command string.

-c command
Specify the shell command to execute when playing audio.

If command is empty then auplayer does not try to play files,
does not look-up files when using the a command, and does not
exit if there are no more entries available.
This is to aid in testing.

-d device
Append "-d device" to the end of the shell command string.

-f file-list
Add each line of file-list to the playlist as below, removing
leading & trailing white-space. If file-list is "-" then the
standard input is read instead.

-g file-list
glob(3) each line of file-list, after removing the leading &
trailing white-space, adding the results to the playlist as
below. If file-list is "-" then the standard input is read
instead.

-h history-size
Specify the number of elements to keep in history.

-l After playing the last file loop back to the beginning instead of
exiting, reshuffling if -s is specified. This option has no
effect if -r is specified.

-i input
Read commands from input instead of the standard input.

-p Have auplayer behave in a manner suitable for being controlled by
another program.

auplayer will print information in a parse friendly format:

: time / [total]
The current position and total length of the current
file. For example: ": 0:12:34.56/1:23:45.67".

! string
Information about the internal state. For example
"!pause" and "!unpause".

@ path The path of the currently playing entry.

+ path The specified path was appended to the playlist.

- path The specified path was removed from the playlist.

This option supersedes -v.

-r Play the audio files in a random order.

-s Shuffle the list of audio files.

-v Enable verbose output.

( Begin an ordered sub-group.

(r Begin a random sub-group. Random sub-groups play one random
entry each time it is selected. Trailing characters are ignored.

(s Begin a shuffled sub-group. Trailing characters are ignored.

) End a sub-group list.

file Append file to the list of files. If it is a directory, non-
recursively append its, sorted, entries to the list of files.

If no input is selected, and the standard input was specified by -f, then
the input will be read from "/dev/tty". However, the -p option will
cause an error to be produced instead.

COMMANDS
Commands have the following global syntax:

[count] c [argument]

Where c is the command character.

The available commands are as follows:

( Begins a sub-group as above. count is ignored.

) Ends a sub-group as above. Both count and argument are ignored.

+ Seek forwards by argument. count is ignored.

- Seek backwards by argument. count is ignored.

= Seek to the time specified by argument. If argument is negative
the seek is relative to the end of the file. count is ignored.

? Print the current file, the position in it, and its length. Both
count and argument are ignored.

/ Search forward for argument and move to the matching entry, if
any. count is ignored.

L Toggle looping. Both count and argument are ignored.

V Toggle verbosity. Both count and argument are ignored.

a Append files matched by argument to the file list. count is
ignored.

d If an argument is given, remove any entries that match argument,
otherwise remove the current entry. count is ignored.

h Go back count entries. argument is ignored.

i A synonym for ?.

j A synonym for h.

k Go forward count entries. argument is ignored.

l A synonym for k.

p Toggle the pause state. Both count and argument are ignored.

q Exit auplayer. Both count and argument are ignored.

r Replay the current entry. Both count and argument are ignored.

EXIT STATUS
The auplayer utility exits 0 on success, and >0 if an error occurs.

SEE ALSO
auopen(1) au2dev(1) glob(3)