1.\" $NetBSD: audioplay.1,v 1.19 2002/10/13 01:06:42 wiz Exp $ 2.\" 3.\" Copyright (c) 1998-2002 Matthew R. Green 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. The name of the author may not be used to endorse or promote products 15.\" derived from this software without specific prior written permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.Dd January 13, 2002 30.Dt AUDIOPLAY 1 31.Os 32.Sh NAME 33.Nm audioplay 34.Nd play audio files 35.Sh SYNOPSIS 36.Nm 37.Op Fl iqVh 38.Op Fl v Ar volume 39.Op Fl b Ar balance 40.Op Fl p Ar port 41.Op Fl d Ar device 42.Oo 43.Fl f 44.Op Fl c Ar channels 45.Op Fl e Ar encoding 46.Op Fl P Ar precision 47.Op Fl s Ar sample-rate 48.Oc 49.Op files ... 50.Sh DESCRIPTION 51The 52.Nm 53program copies the named audiofiles, or the standard input if no files are 54named, to the audio device. 55The special name 56.Dq - 57is assumed to mean the standard input. 58The input files must contain a valid audio header, and the encoding must be 59understood by the underlying driver. 60.Sh OPTIONS 61The following options are available: 62.Bl -tag -width 123456 63.It Fl i 64If the audio device cannot be opened, exit now rather than wait for it. 65.It Fl q 66Be quiet. 67.It Fl V 68Be verbose. 69.It Fl h 70Print a help message. 71.It Fl v 72Set the volume (gain) to 73.Ar volume . 74This value must be between 0 and 255. 75.It Fl b 76Set the balance to 77.Ar balance . 78This value must be between 0 and 63. 79.It Fl p 80Set the output port to 81.Ar port . 82The valid values of 83.Ar port 84are 85.Dq speaker , 86.Dq headphone 87and 88.Dq line . 89.It Fl d 90Set the audio device to be 91.Ar device . 92The default is 93.Pa /dev/sound . 94.It Fl f 95Force playing, even if the format is unknown. 96The 97.Fl f 98flag can be used in addition with the following flags to 99change the number of channels, encoding, precision and 100sample rate. 101.It Fl c 102when combined with the 103.Fl f 104option, sets the number of channels to its argument. 105.It Fl e 106when combined with the 107.Fl f 108option, sets the encoding to its argument. 109Possible values are 110.Cm mulaw , 111.Cm ulaw , 112.Cm alaw , 113.Cm slinear , 114.Cm linear , 115.Cm ulinear , 116.Cm adpcm , 117.Cm ADPCM , 118.Cm slinear_le , 119.Cm linear_le , 120.Cm ulinear_le , 121.Cm slinear_be , 122.Cm linear_be , 123.Cm ulinear_be , 124.Cm mpeg_l1_stream , 125.Cm mpeg_l1_packets , 126.Cm mpeg_l1_system , 127.Cm mpeg_l2_stream , 128.Cm mpeg_l2_packets , 129and 130.Cm mpeg_l2_system . 131.It Fl P 132when combined with the 133.Fl f 134option, sets the precision to its argument. 135This value must be either 4, 8, 16, 24 or 32. 136.It Fl s 137when combined with the 138.Fl f 139option, sets the sample rate to its argument. 140This value must be a valid value for the audio device or an error will 141be returned. 142.El 143.Sh ENVIRONMENT 144.Bl -tag -width AUDIOCTLDEVICE 145.It AUDIOCTLDEVICE 146the audio control device to be used. 147.It AUDIODEVICE 148the audio device to be used. 149.El 150.Sh EXAMPLES 151Play a raw dump taken from an audio CD ROM: 152.Pp 153.Dl "audioplay -f -c 2 -P 16 -s 44100 -e slinear_le filename" 154.Pp 155The 156.Xr audioctl 1 157program can be used to show the available supported encodings: 158.Pp 159.Dl "audioctl encodings" 160.Sh NOTES 161.Nm 162can be used to play Sun/NeXT audio files, and also RIFF WAVE audio files. 163.Nm 164can be configured in the 165.Dq Netscape 166web browser as the program to use when playing audio files. 167.Sh ERRORS 168If the audio device or the control device can not be opened, and error is 169returned. 170.Pp 171If an invalid parameter is specified, an error is returned. 172The set of valid values for any audio parameter is specified by the 173hardware driver. 174.Sh SEE ALSO 175.Xr audioctl 1 , 176.Xr audiorecord 1 , 177.Xr aria 4 , 178.Xr audio 4 , 179.Xr audioamd 4 , 180.Xr auich 4 , 181.Xr autri 4 , 182.Xr auvia 4 , 183.Xr clcs 4 , 184.Xr clct 4 , 185.Xr cmpci 4 , 186.Xr eap 4 , 187.Xr emuxki 4 , 188.Xr esm 4 , 189.Xr eso 4 , 190.Xr ess 4 , 191.Xr fms 4 , 192.Xr gus 4 , 193.Xr guspnp 4 , 194.Xr neo 4 , 195.Xr sb 4 , 196.Xr sv 4 , 197.Xr wss 4 , 198.Xr yds 4 , 199.Xr ym 4 200.Sh HISTORY 201The 202.Nm 203program was first seen in SunOS 5. 204The 205.Nx 206.Nm 207was first made available in 208.Nx 1.4 . 209.Sh AUTHORS 210The 211.Nm 212program was written by 213.An Matthew R. Green Aq mrg@eterna.com.au . 214