2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH AUDIOPLAY 1 "May 13, 2017"
8 audioplay \- play audio files
12 \fBaudioplay\fR [\fB-iV\fR] [\fB-v\fR \fIvol\fR] [\fB-d\fR \fIdev\fR] [\fIfile\fR]...
17 The \fBaudioplay\fR utility copies the named audio files (or the standard input
18 if no filenames are present) to the audio device. If no input file is specified
19 and standard input is a tty, the program exits with an error message.
22 The input files must contain a valid audio file header. The encoding
23 information in this header is matched against the capabilities of the audio
24 device and, if the data formats are incompatible, an error message is printed
25 and the file is skipped. Compressed \fBADPCM\fR (G.721) monaural audio data is
26 automatically uncompressed before playing.
29 Minor deviations in sampling frequency (that is, less than 1%) are ordinarily
30 ignored. This allows, for instance, data sampled at 8012 Hz to be played on an
31 audio device that only supports 8000 Hz. If the \fB-V\fR option is present,
32 such deviations are flagged with warning messages.
35 The following options are supported:
39 \fB\fB-d\fR \fIdev\fR\fR
42 \fIDevice\fR: The \fIdev\fR argument specifies an alternate audio device to
43 which output should be directed. If the \fB-d\fR option is not specified, the
44 \fBAUDIODEV\fR environment variable is consulted (see below). Otherwise,
45 \fB/dev/audio\fR is used as the default audio device.
54 \fIImmediate\fR: If the audio device is unavailable (that is, another process
55 currently has write access), \fBaudioplay\fR ordinarily waits until it can
56 obtain access to the device. When the \fB-i\fR option is present,
57 \fBaudioplay\fR prints an error message and exits immediately if the device is
64 \fB\fB-v\fR \fIvol\fR\fR
67 \fIVolume\fR: The output volume is set to the specified value before playing
68 begins, and is reset to its previous level when \fBaudioplay\fR exits. The
69 \fIvol\fR argument is an integer value between 0 and 100, inclusive. If this
70 argument is not specified, the output volume remains at the level most recently
80 \fIVerbose\fR: Prints messages on the standard error when waiting for access to
81 the audio device or when sample rate deviations are detected.
90 \fIHelp\fR: Prints a command line usage message.
99 \fIFile Specification\fR: Audio files named on the command line are played
100 sequentially. If no filenames are present, the standard input stream (if it is
101 not a tty) is played (it, too, must contain an audio file header). The special
102 filename \fB\(mi\fR can be used to read the standard input stream instead of a
103 file. If a relative path name is supplied, the \fBAUDIOPATH\fR environment
104 variable is consulted (see below).
109 See \fBlargefile\fR(5) for the description of the behavior of \fBaudioplay\fR
110 when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
111 .SH ENVIRONMENT VARIABLES
117 The full path name of the audio device to write to, if no \fB-d\fR argument is
118 supplied. If the \fBAUDIODEV\fR variable is not set, \fB/dev/audio\fR is used.
124 \fB\fBAUDIOPATH\fR\fR
127 A colon-separated list of directories in which to search for audio files whose
128 names are given by relative pathnames. The current directory (\fB\&.\fR) can be
129 specified explicitly in the search path. If the \fBAUDIOPATH\fR variable is not
130 set, only the current directory is searched.
135 See \fBattributes\fR(5) for descriptions of the following attributes:
143 ATTRIBUTE TYPE ATTRIBUTE VALUE
145 Architecture SPARC, x86
147 Interface Stability Committed
152 \fBaudioconvert\fR(1), \fBaudiorecord\fR(1),
153 \fBattributes\fR(5), \fBlargefile\fR(5), \fBaudio\fR(7I)
156 \fBaudioplay\fR currently supports a limited set of audio format conversions.
157 If the audio file is not in a format supported by the audio device, it must
158 first be converted. For example, to convert to voice format on the fly, use the
163 example% \fBaudioconvert -f voice myfile | audioplay\fR
170 The format conversion is not always be able to keep up with the audio output.
171 If this is the case, you should convert to a temporary file before playing the