NetBSD/usr.bin/audio/play/audioplay.1

200 lines
4.9 KiB
Groff

.\" $NetBSD: audioplay.1,v 1.7 1999/09/14 05:04:21 mrg Exp $
.\"
.\" Copyright (c) 1998-1999 Matthew R. Green
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd March 30, 1999
.Dt AUDIOPLAY 1
.Os NetBSD
.Sh NAME
.Nm audioplay
.Nd play audio files
.Sh SYNOPSIS
.Nm
.Op Fl iqVh
.Op Fl v Ar volume
.Op Fl b Ar balance
.Op Fl p Ar port
.Op Fl d Ar device
.Op Fl C Ar ctl
.Oo
.Fl f
.Op Fl c Ar channels
.Op Fl e Ar encoding
.Op Fl P Ar precision
.Op Fl s Ar sample-rate
.Oc
.Op files ...
.Sh DESCRIPTION
The
.Nm
program copies the named audiofiles, or the standard input if no files are
named, to the audio device. The input files must contain a valid audio
header, and the encoding must be understood by the underlying driver.
.Sh OPTIONS
The following options are available:
.Bl -tag -width 123456
.It Fl i
If the audio device cannot be opened, exit now rather than wait for it.
.It Fl q
Be quiet.
.It Fl V
Be verbose.
.It Fl h
Print a help message.
.It Fl v
Set the volume (gain) to
.Ar volume .
This value must be between 0 and 255.
.It Fl b
Set the balance to
.Ar balance .
This value must be between 0 and 63.
.It Fl p
Set the output port to
.Ar port .
The valid values of
.Ar port
are
.Dq speaker ,
.Dq headphone
and
.Dq line .
.It Fl d
Set the audio device to be
.Ar device .
The default is
.Pa /dev/audio0 .
.It Fl C
Set the audio control device to be
.Ar ctl .
The default is
.Pa /dev/audioctl0 .
.It Fl f
Force playing, even if the format is unknown. The
.Fl f
flag can be used in addition with the following flags to
change the number of channels, encoding, precision and
sample rate.
.It Fl c
when combined with the
.Fl f
option, sets the number of channels to its argument.
.It Fl e
when combined with the
.Fl f
option, sets the encoding to its argument. Possible values are
.Cm mulaw ,
.Cm ulaw ,
.Cm alaw ,
.Cm slinear ,
.Cm linear ,
.Cm ulinear ,
.Cm adpcm ,
.Cm ADPCM ,
.Cm slinear_le ,
.Cm linear_le ,
.Cm ulinear_le ,
.Cm slinear_be ,
.Cm linear_be ,
.Cm ulinear_be ,
.Cm mpeg_l1_stream ,
.Cm mpeg_l1_packets ,
.Cm mpeg_l1_system ,
.Cm mpeg_l2_stream ,
.Cm mpeg_l2_packets ,
and
.Cm mpeg_l2_system .
.It Fl P
when combined with the
.Fl f
option, sets the precision to its argument. This value must be either
8, 16, 24 or 32.
.It Fl s
when combined with the
.Fl 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.
.El
.Sh ENVIRONMENT
.Bl -tag -width AUDIOCTLDEVICE
.It AUDIOCTLDEVICE
the audio control device to be used.
.It AUDIODEVICE
the audio device to be used.
.El
.Sh EXAMPLES
Play a raw dump taken from an audio CD ROM:
.Pp
.Dl "audioplay -f -c 2 -P 16 -s 44100 -e slinear_le filename
.Pp
The
.Xr audioctl 1
program can be used to show the available supported encodings:
.Pp
.Dl "audioctl encodings
.Pp
.Sh NOTES
.Nm
can be used to play Sun/NeXT audio files, and also RIFF WAVE audio files.
.Nm
can be configured in the
.Dq Netscape
web browser as the program to use when playing audio files.
.Sh ERRORS
If the audio device or the control device can not be opened, and error is
returned.
.Pp
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.
.Sh HISTORY
The
.Nm
program was first seen in SunOS 5. The
.Nx
.Nm
was first made available in
.Nx 1.4 .
.Sh AUTHOR
The
.Nm
program was written by Matthew R. Green <mrg@eterna.com.au>.
.Sh SEE ALSO
.Xr audioctl 1 ,
.Xr audiorecord 1 ,
.Xr audioamd 4 ,
.Xr aria 4 ,
.Xr audio 4 ,
.Xr eap 4 ,
.Xr eso 4 ,
.Xr ess 4 ,
.Xr gus 4 ,
.Xr guspnp 4 ,
.Xr sb 4 ,
.Xr sv 4 ,
.Xr wss 4 ,
.Xr ym 4 .