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