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