224 lines
5.4 KiB
Groff
224 lines
5.4 KiB
Groff
.\" $NetBSD: audiorecord.1,v 1.35 2004/07/09 11:36:33 wiz Exp $
|
|
.\"
|
|
.\" Copyright (c) 1998-1999 Matthew R. Green
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. The name of the author may not be used to endorse or promote products
|
|
.\" derived from this software without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.Dd October 13, 2002
|
|
.Dt AUDIORECORD 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm audiorecord
|
|
.Nd record audio files
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl afhqV
|
|
.Op Fl b Ar balance
|
|
.Op Fl c Ar channels
|
|
.Op Fl d Ar device
|
|
.Op Fl e Ar encoding
|
|
.Op Fl F Ar format
|
|
.Op Fl i Ar info
|
|
.Op Fl m Ar monvol
|
|
.Op Fl P Ar precision
|
|
.Op Fl p Ar port
|
|
.Op Fl s Ar rate
|
|
.Op Fl t Ar time
|
|
.Op Fl v Ar volume
|
|
.Ar file
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
program copies the audio device to the named audiofile or to the standard
|
|
output if no file is named.
|
|
.Pp
|
|
The output file will contain either a Sun/NeXT audio header, a
|
|
RIFF/WAVE audio header or no header at all.
|
|
Sun output files using a linear PCM encoding are written with big-endian
|
|
signed samples, possibly after converting these from little-endian or
|
|
unsigned samples.
|
|
RIFF/WAVE files are written in little-endian, signed samples, also
|
|
converting if necessary.
|
|
The default output is Sun/NeXT format, but if the output file
|
|
.Ar file
|
|
ends with a
|
|
.Pa .wav
|
|
file extension it will be written as RIFF/WAVE.
|
|
.Sh OPTIONS
|
|
The following options are available:
|
|
.Bl -tag -width XpXprecisionX
|
|
.It Fl a
|
|
Append to the specified file, rather than overwriting.
|
|
.It Fl b Ar balance
|
|
Set the balance to
|
|
.Ar balance .
|
|
This value must be between 0 and 63.
|
|
.It Fl c Ar channels
|
|
Set number of channels to
|
|
.Ar channels .
|
|
.It Fl d Ar device
|
|
Set the audio device to be
|
|
.Ar device .
|
|
The default is
|
|
.Pa /dev/sound .
|
|
.It Fl e Ar encoding
|
|
Set encoding to either
|
|
.Dq alaw ,
|
|
.Dq ulaw
|
|
or
|
|
.Dq linear ,
|
|
or any other value reported by
|
|
.Ic audioctl encodings .
|
|
The default encoding is
|
|
.Dq ulaw .
|
|
If the output format is
|
|
.Dq sun ,
|
|
the file will contain slinear_be samples, if it is
|
|
.Dq wav ,
|
|
then slinear_le, independent of the argument to
|
|
.Fl e .
|
|
Setting the argument to
|
|
.Fl e
|
|
still may be important since it is used in an
|
|
.Xr ioctl 2
|
|
call to the kernel to choose the kind of data provided.
|
|
.It Fl F Ar format
|
|
Set the output header format to
|
|
.Ar format .
|
|
Currently supported formats are
|
|
.Dq sun ,
|
|
.Dq wav ,
|
|
and
|
|
.Dq none
|
|
for Sun/NeXT audio, WAV, and no header, respectively.
|
|
.It Fl f
|
|
Force.
|
|
Normally when appending to audiofiles using the
|
|
.Fl a
|
|
option, the sample rates must match.
|
|
The
|
|
.Fl f
|
|
option will allow a discrepancy to be ignored.
|
|
.It Fl h
|
|
Print a help message.
|
|
.It Fl i Ar info
|
|
If supported by the
|
|
.Fl F
|
|
format, add the string
|
|
.Ar info
|
|
to the output header.
|
|
.It Fl m Ar monvol
|
|
Set the monitor volume.
|
|
.It Fl P Ar precision
|
|
Set the precision.
|
|
This value is the number of bits per sample, and is normally either
|
|
.Dq 8
|
|
or
|
|
.Dq 16 ,
|
|
though the values
|
|
.Dq 4 ,
|
|
.Dq 24 ,
|
|
and
|
|
.Dq 32
|
|
are also valid.
|
|
.It Fl p Ar port
|
|
Set the input port to
|
|
.Ar port .
|
|
The valid values of
|
|
.Ar port
|
|
are
|
|
.Dq cd ,
|
|
.Dq internal-cd ,
|
|
.Dq mic ,
|
|
and
|
|
.Dq line .
|
|
.It Fl s Ar rate
|
|
Set the sampling rate.
|
|
This value is per-second.
|
|
Typical values are 8000, 44100, and 48000, which are the telephone,
|
|
CD Audio, and DAT Audio default sampling rates.
|
|
.It Fl t Ar time
|
|
Sets the maximum amount of time to record.
|
|
Format is [hh:]mm:ss.
|
|
.It Fl q
|
|
Be quiet.
|
|
.It Fl V
|
|
Be verbose.
|
|
.It Fl v Ar volume
|
|
Set the volume (gain) to
|
|
.Ar volume .
|
|
This value must be between 0 and 255.
|
|
.El
|
|
.Sh ENVIRONMENT
|
|
.Bl -tag -width AUDIOCTLDEVICE
|
|
.It AUDIOCTLDEVICE
|
|
the audio control device to be used.
|
|
.It AUDIODEVICE
|
|
the audio device to be used.
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr audioctl 1 ,
|
|
.Xr audioplay 1 ,
|
|
.Xr aria 4 ,
|
|
.Xr audio 4 ,
|
|
.Xr audioamd 4 ,
|
|
.Xr auich 4 ,
|
|
.Xr autri 4 ,
|
|
.Xr auvia 4 ,
|
|
.Xr clcs 4 ,
|
|
.Xr clct 4 ,
|
|
.Xr cmpci 4 ,
|
|
.Xr eap 4 ,
|
|
.Xr emuxki 4 ,
|
|
.Xr esm 4 ,
|
|
.Xr eso 4 ,
|
|
.Xr ess 4 ,
|
|
.Xr fms 4 ,
|
|
.Xr gus 4 ,
|
|
.Xr guspnp 4 ,
|
|
.Xr neo 4 ,
|
|
.Xr sb 4 ,
|
|
.Xr sv 4 ,
|
|
.Xr wss 4 ,
|
|
.Xr yds 4 ,
|
|
.Xr ym 4
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
program was first seen in SunOS 5.
|
|
It was first made available in
|
|
.Nx 1.4 .
|
|
RIFF/WAVE support, and support for converting signed/unsigned and
|
|
big/little-endian samples was first made available in
|
|
.Nx 1.6 .
|
|
.Sh AUTHORS
|
|
The
|
|
.Nm
|
|
program was written by
|
|
.An Matthew R. Green Aq mrg@eterna.com.au .
|
|
.Sh BUGS
|
|
WAV big-endian samples are converted to little-endian, rather than
|
|
a RIFX header being written.
|