1audioplay(1) User Commands audioplay(1)
2
3
4
6 audioplay - play audio files
7
9 audioplay [-iV] [-v vol] [-d dev] [file]...
10
11
13 The audioplay utility copies the named audio files (or the standard
14 input if no filenames are present) to the audio device. If no input
15 file is specified and standard input is a tty, the program exits with
16 an error message.
17
18
19 The input files must contain a valid audio file header. The encoding
20 information in this header is matched against the capabilities of the
21 audio device and, if the data formats are incompatible, an error mes‐
22 sage is printed and the file is skipped. Compressed ADPCM (G.721)
23 monaural audio data is automatically uncompressed before playing.
24
25
26 Minor deviations in sampling frequency (that is, less than 1%) are
27 ordinarily ignored. This allows, for instance, data sampled at 8012 Hz
28 to be played on an audio device that only supports 8000 Hz. If the -V
29 option is present, such deviations are flagged with warning messages.
30
32 The following options are supported:
33
34 -d dev Device: The dev argument specifies an alternate audio device
35 to which output should be directed. If the -d option is not
36 specified, the AUDIODEV environment variable is consulted
37 (see below). Otherwise, /dev/audio is used as the default
38 audio device.
39
40
41 -i Immediate: If the audio device is unavailable (that is,
42 another process currently has write access), audioplay ordi‐
43 narily waits until it can obtain access to the device. When
44 the -i option is present, audioplay prints an error message
45 and exits immediately if the device is busy.
46
47
48 -v vol Volume: The output volume is set to the specified value
49 before playing begins, and is reset to its previous level
50 when audioplay exits. The vol argument is an integer value
51 between 0 and 100, inclusive. If this argument is not speci‐
52 fied, the output volume remains at the level most recently
53 set by any process.
54
55
56 -V Verbose: Prints messages on the standard error when waiting
57 for access to the audio device or when sample rate devia‐
58 tions are detected.
59
60
61 −\? Help: Prints a command line usage message.
62
63
65 file File Specification: Audio files named on the command line are
66 played sequentially. If no filenames are present, the standard
67 input stream (if it is not a tty) is played (it, too, must con‐
68 tain an audio file header). The special filename − can be used
69 to read the standard input stream instead of a file. If a rela‐
70 tive path name is supplied, the AUDIOPATH environment variable
71 is consulted (see below).
72
73
75 See largefile(5) for the description of the behavior of audioplay when
76 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
77
79 AUDIODEV The full path name of the audio device to write to, if no
80 -d argument is supplied. If the AUDIODEV variable is not
81 set, /dev/audio is used.
82
83
84 AUDIOPATH A colon-separated list of directories in which to search
85 for audio files whose names are given by relative path‐
86 names. The current directory (.) can be specified explic‐
87 itly in the search path. If the AUDIOPATH variable is not
88 set, only the current directory is searched.
89
90
92 See attributes(5) for descriptions of the following attributes:
93
94
95
96
97 ┌─────────────────────────────┬─────────────────────────────┐
98 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
99 ├─────────────────────────────┼─────────────────────────────┤
100 │Architecture │SPARC, x86 │
101 ├─────────────────────────────┼─────────────────────────────┤
102 │Availability │SUNWauda │
103 ├─────────────────────────────┼─────────────────────────────┤
104 │Interface Stability │Committed │
105 └─────────────────────────────┴─────────────────────────────┘
106
108 audioconvert(1), audiorecord(1), mixerctl(1), attributes(5), large‐
109 file(5), audio(7I)
110
112 audioplay currently supports a limited set of audio format conversions.
113 If the audio file is not in a format supported by the audio device, it
114 must first be converted. For example, to convert to voice format on the
115 fly, use the command:
116
117 example% audioconvert -f voice myfile | audioplay
118
119
120
121
122 The format conversion is not always be able to keep up with the audio
123 output. If this is the case, you should convert to a temporary file
124 before playing the data.
125
126
127
128SunOS 5.11 1 May 2009 audioplay(1)