audioplay(1) [netbsd man page]
AUDIOPLAY(1) BSD General Commands Manual AUDIOPLAY(1) NAME
audioplay -- play audio files SYNOPSIS
audioplay [-hiqV] [-B buffersize] [-b balance] [-d device] [-p port] [-v volume] [-f [-c channels] [-e encoding] [-P precision] [-s sample-rate]] [files ...] DESCRIPTION
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 under- lying driver. OPTIONS
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 its argument. -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 argument. 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, and mpeg_l2_system. -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 for it. -P When combined with the -f option, sets the precision to its argument. 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 and 255. ENVIRONMENT
AUDIOCTLDEVICE the audio control device to be used. AUDIODEVICE the audio device to be used. EXAMPLES
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 encodings: audioctl encodings NOTES
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. ERRORS
If the audio device or the control device can not be opened, and error is returned. 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. SEE ALSO
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) HISTORY
The audioplay program was first seen in SunOS 5. The NetBSD audioplay was first made available in NetBSD 1.4. AUTHORS
The audioplay program was written by Matthew R. Green <mrg@eterna.com.au>. BSD
December 30, 2010 BSD
Check Out this Related Man Page
audioplay(1) User Commands audioplay(1) NAME
audioplay - play audio files SYNOPSIS
audioplay [-iV] [-v vol] [-b bal] [-p speaker | headphone | line] [-d dev] [file...] DESCRIPTION
The audioplay utility copies the named audio files (or the standard input if no filenames are present) to the audio device. If no input file is specified and standard input is a tty, the port, volume, and balance settings specified on the command line will be applied and the program will exit. The input files must contain a valid audio file header. The encoding information in this header is matched against the capabilities of the audio device and, if the data formats are incompatible, an error message is printed and the file is skipped. Compressed ADPCM (G.721) monaural audio data is automatically uncompressed before playing. Minor deviations in sampling frequency (that is, less than 1%) are ordinarily ignored. This allows, for instance, data sampled at 8012 Hz to be played on an audio device that only supports 8000 Hz. If the -V option is present, such deviations are flagged with warning mes- sages. OPTIONS
The following options are supported: -i Immediate: If the audio device is unavailable (that is, another process currently has write access), audioplay ordinarily waits until it can obtain access to the device. When the -i option is present, audioplay prints an error message and exits immediately if the device is busy. -V Verbose: Prints messages on the standard error when waiting for access to the audio device or when sample rate deviations are detected. -v vol Volume: The output volume is set to the specified value before playing begins, and is reset to its previous level when audioplay exits. The vol argument is an integer value between 0 and 100, inclusive. If this argument is not specified, the output volume remains at the level most recently set by any process. -b bal Balance: The output balance is set to the specified value before playing begins, and is reset to its previous level when audioplay exits. The bal argument is an integer value between -100 and 100, inclusive. A value of -100 indicates left balance, 0 middle, and 100 right. If this argument is not specified, the output balance remains at the level most recently set by any process. -p speaker | headphone | line Output Port: Selects the built-in speaker (the default), headphone jack, or line out as the destination of the audio output signal. If this argument is not specified, the output port will remain unchanged. Please note: Not all audio adapters support all of the output ports. If the named port does not exist, an appropriate substitute will be used. -d dev Device: The dev argument specifies an alternate audio device to which output should be directed. If the -d option is not specified, the AUDIODEV environment variable is consulted (see below). Otherwise, /dev/audio is used as the default audio device. -? Help: Prints a command line usage message. OPERANDS
file File Specification: Audio files named on the command line are played sequentially. If no filenames are present, the standard input stream (if it is not a tty) is played (it, too, must contain an audio file header). The special filename `-' may be used to read the standard input stream instead of a file. If a relative path name is supplied, the AUDIOPATH environment variable is consulted (see below). USAGE
See largefile(5) for the description of the behavior of audioplay when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). ENVIRONMENT VARIABLES
AUDIODEV The full path name of the audio device to write to, if no -d argument is supplied. If the AUDIODEV variable is not set, /dev/audio is used. AUDIOPATH A colon-separated list of directories in which to search for audio files whose names are given by relative pathnames. The current directory (".") may be specified explicitly in the search path. If the AUDIOPATH variable is not set, only the cur- rent directory will be searched. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |SPARC, x86 | +-----------------------------+-----------------------------+ |Availability |SUNWauda | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
audioconvert(1), audiorecord(1), mixerctl(1), attributes(5), largefile(5), usb_ac(7D), audio(7I), mixer(7I) BUGS
audioplay currently supports a limited set of audio format conversions. If the audio file is not in a format supported by the audio device, it must first be converted. For example, to convert to voice format on the fly, use the command: example% audioconvert -f voice myfile | audioplay The format conversion will not always be able to keep up with the audio output. If this is the case, you should convert to a temporary file before playing the data. SunOS 5.10 16 Feb 2001 audioplay(1)