1.\" $NetBSD: audiorecord.1,v 1.30 2002/12/08 10:00:12 mrg Exp $ 2.\" 3.\" Copyright (c) 1998-1999 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 October 13, 2002 30.Dt AUDIORECORD 1 31.Os 32.Sh NAME 33.Nm audiorecord 34.Nd record audio files 35.Sh SYNOPSIS 36.Nm "" 37.Op Fl afhV 38.Op Fl b Ar balance 39.Op Fl c Ar channels 40.Op Fl d Ar device 41.Op Fl e Ar encoding 42.Op Fl F Ar format 43.Op Fl i Ar info 44.Op Fl m Ar monvol 45.Op Fl P Ar precision 46.Op Fl p Ar input 47.Op Fl s Ar rate 48.Op Fl t Ar time 49.Op Fl v Ar volume 50.Ar file 51.Sh DESCRIPTION 52The 53.Nm 54program copies the audio device to the named audiofile or to the standard 55output if no file is named. 56.Pp 57The output file will contain either a Sun/NeXT audio header, a 58RIFF/WAVE audio header or no header at all. 59Sun output files using a linear PCM encoding are written with big-endian 60signed samples, possibly after converting these from little-endian or 61unsigned samples. 62RIFF/WAVE files are written in little-endian, signed samples, also 63converting if necessary. 64The default output is Sun/NeXT format, but if the output file 65.Ar file 66ends with a 67.Pa .wav 68file extension it will be written as RIFF/WAVE. 69.Sh OPTIONS 70The following options are available: 71.Bl -tag -width 123456 72.It Fl a 73Append to the specified file, rather than overwriting. 74.It Fl b 75Set the balance to 76.Ar balance . 77This value must be between 0 and 63. 78.It Fl c 79Set number of channels to 80.Ar channels . 81.It Fl d 82Set the audio device to be 83.Ar device . 84The default is 85.Pa /dev/sound . 86.It Fl e 87Set encoding to either 88.Dq alaw , 89.Dq ulaw 90or 91.Dq linear , 92or any other value reported by 93.Ic audioctl encodings . 94The default encoding is 95.Dq ulaw . 96If the output format is 97.Dq sun , 98the file will contain slinear_be samples, if it is 99.Dq wav , 100then slinear_le, independent of the argument to 101.Fl e . 102Setting the argument to 103.Fl e 104still may be important since it is used in an 105.Xr ioctl 2 106call to the kernel to choose the kind of data provided. 107.It Fl F 108Set the output header format to 109.Ar format . 110Currently supported formats are 111.Dq sun , 112.Dq wav 113and 114.Dq none 115for Sun/NeXT audio, WAV and no header, respectively. 116.It Fl f 117Force. 118Normally when appending to audiofiles using the 119.Fl a 120option, the sample rates must match. 121The 122.Fl f 123option will allow a discrepancy to be ignored. 124.It Fl h 125Print a help message. 126.It Fl i Ar info 127If supported by the 128.Fl F 129format, add the string 130.Ar info 131to the output header. 132.It Fl m 133Set the monitor volume. 134.It Fl P 135Set the precision. 136This value is the number of bits per sample, and is normally either 137.Dq 8 138or 139.Dq 16 , 140though the values 141.Dq 4 , 142.Dq 24 143and 144.Dq 32 145are also valid. 146.It Fl p 147Set the input port to 148.Ar port . 149The valid values of 150.Ar port 151are 152.Dq cd , 153.Dq internal-cd 154.Dq mic 155and 156.Dq line . 157.It Fl s 158Set the sampling rate. 159This value is per-second. 160Typical values are 8000, 44100 and 48000, which are the telephone, 161CD Audio and DAT Audio default sampling rates. 162.It Fl t 163Sets the maximum amount of time to record. 164Format is [hh:]mm:ss. 165.It Fl q 166Be quiet. 167.It Fl V 168Be verbose. 169.It Fl v 170Set the volume (gain) to 171.Ar volume . 172This value must be between 0 and 255. 173.El 174.Sh ENVIRONMENT 175.Bl -tag -width AUDIOCTLDEVICE 176.It AUDIOCTLDEVICE 177the audio control device to be used. 178.It AUDIODEVICE 179the audio device to be used. 180.El 181.Sh SEE ALSO 182.Xr audioctl 1 , 183.Xr audioplay 1 , 184.Xr aria 4 , 185.Xr audio 4 , 186.Xr audioamd 4 , 187.Xr auich 4 , 188.Xr autri 4 , 189.Xr auvia 4 , 190.Xr clcs 4 , 191.Xr clct 4 , 192.Xr cmpci 4 , 193.Xr eap 4 , 194.Xr emuxki 4 , 195.Xr esm 4 , 196.Xr eso 4 , 197.Xr ess 4 , 198.Xr fms 4 , 199.Xr gus 4 , 200.Xr guspnp 4 , 201.Xr neo 4 , 202.Xr sb 4 , 203.Xr sv 4 , 204.Xr wss 4 , 205.Xr yds 4 , 206.Xr ym 4 207.Sh HISTORY 208The 209.Nm 210program was first seen in SunOS 5. 211It was first made available in 212.Nx 1.4 . 213RIFF/WAVE support, and support for converting signed/unsigned and 214big/little-endian samples was first made available in 215.Nx 1.6 . 216.Sh AUTHORS 217The 218.Nm 219program was written by 220.An Matthew R. Green Aq mrg@eterna.com.au . 221.Sh BUGS 222WAV big-endian samples are converted to little-endian, rather than 223a RIFX header being written. 224