- NetBSD Manual Pages
AUDIOPLAY(1) NetBSD General Commands Manual AUDIOPLAY(1)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
audioplay -- play audio files
audioplay [-hiqV] [-B buffersize] [-b balance] [-d device] [-p port]
[-v volume] [-f [-c channels] [-e encoding] [-P precision]
[-s sample-rate]] [files ...]
The audioplay program copies the named audio files, or the standard input
if no files are named, to the audio device. The special name ``-'' is
assumed to mean the standard input. The input files must contain a valid
audio header, and the encoding must be understood by the underlying
The following options are available:
-B Set the write block size to buffersize. The default value is the
play.buffer_size of the audio device.
-b Set the balance to balance. This value must be between 0 and 63.
-c When combined with the -f option, sets the number of channels to
-d Set the audio device to be device. The default is /dev/sound.
-e When combined with the -f option, sets the encoding to its argu-
ment. Possible values are mulaw, ulaw, alaw, slinear, linear,
ulinear, adpcm, ADPCM, slinear_le, linear_le, ulinear_le,
slinear_be, linear_be, ulinear_be, mpeg_l1_stream,
mpeg_l1_packets, mpeg_l1_system, mpeg_l2_stream, mpeg_l2_packets,
-f Force playing, even if the format is unknown. The -f flag can be
used in addition with the -c, -e, -P, and -s flags to change the
number of channels, encoding, precision, and sample rate.
-h Print a help message.
-i If the audio device cannot be opened, exit now rather than wait
-P When combined with the -f option, sets the precision to its argu-
ment. This value must be either 4, 8, 16, 24 or 32.
-p Set the output port to port. The valid values of port are
``speaker'', ``headphone'' and ``line''.
-q Be quiet.
-s When combined with the -f option, sets the sample rate to its
argument. This value must be a valid value for the audio device
or an error will be returned.
-V Be verbose.
-v Set the volume (gain) to volume. This value must be between 0
AUDIOCTLDEVICE the audio control device to be used.
AUDIODEVICE the audio device to be used.
Play a raw dump taken from an audio CD ROM:
audioplay -f -c 2 -P 16 -s 44100 -e slinear_le filename
The audioctl(1) program can be used to show the available supported
audioplay can be used to play Sun/NeXT audio files, and also RIFF WAVE
audio files. audioplay can be configured in the ``Netscape'' web browser
as the program to use when playing audio files.
If the audio device or the control device can not be opened, and error is
If an invalid parameter is specified, an error is returned. The set of
valid values for any audio parameter is specified by the hardware driver.
audioctl(1), audiorecord(1), aria(4), audio(4), audioamd(4), auich(4),
autri(4), auvia(4), clcs(4), clct(4), cmpci(4), eap(4), emuxki(4),
esm(4), eso(4), ess(4), fms(4), gus(4), guspnp(4), neo(4), sb(4), sv(4),
wss(4), yds(4), ym(4)
The audioplay program was first seen in SunOS 5. The NetBSD audioplay
was first made available in NetBSD 1.4.
The audioplay program was written by Matthew R. Green
NetBSD 9.2 December 30, 2010 NetBSD 9.2