]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/1/audio
libmp: add mpnrand() function to generate uniform random number 0 ≤ x < n
[plan9front.git] / sys / man / 1 / audio
index c941fa5f000e0d327c1b993b750b7a47bddba674..7e394b0071047509344d9f99cb5a8358fe51a571 100644 (file)
@@ -1,6 +1,6 @@
 .TH AUDIO 1
 .SH NAME
-mp3dec, mp3enc, oggdec, oggenc, flacdec \- decode and encode audio files
+mp3dec, mp3enc, oggdec, oggenc, flacdec, sundec, wavdec, pcmconv, mixfs \- decode and encode audio files
 .SH SYNOPSIS
 .B audio/mp3dec
 [
@@ -10,6 +10,10 @@ mp3dec, mp3enc, oggdec, oggenc, flacdec \- decode and encode audio files
 .B audio/oggdec
 .br
 .B audio/flacdec
+.br
+.B audio/wavdec
+.br
+.B audio/sundec
 .PP
 .B audio/oggenc
 .br
@@ -37,6 +41,29 @@ q ] [
 .I "long or silly options"
 ]
 .PP
+.B audio/pcmconv
+[
+.B -i
+.I fmt
+] [
+.B -o
+.I fmt
+] [
+.B -l
+.I length
+]
+.PP
+.B audio/mixfs
+[
+.B -D
+] [
+.B -s
+.I srvname
+] [
+.B -m
+.I mtpt
+]
+.PP
 .SH DESCRIPTION
 These programs decode and encode various audio formats from and to
 16-bit stereo PCM (little endian). The decoders read the compressed
@@ -47,15 +74,18 @@ a sampling frequency of 44.1KHz.
 decodes MPEG audio (layer 1, 2 and 3). The
 .B -d
 option enables debug output to standard error.
-.I Oggdec
+.I Oggdec,
+.I flacdec,
+.I sunwdec
 and
-.I flacdec
+.I wavdec
 are like
 .I mp3dec
-but decode OGG Vorbis and FLAC lossless audio.
+but decode OGG Vorbis, FLAC lossless audio, Sun audio and RIFF wave.
 .PP
 The encoders read PCM on standard input and produce compressed audio
 on standard output.
+.PP
 .I Oggenc
 and
 .I mp3enc
@@ -68,6 +98,14 @@ but that can be changed via
 or
 .BR -v
 (variable bitrate, VBR).
+.PP
+.I Oggenc
+accepts raw PCM in the same byte order as
+.B /dev/audio
+(little-endian),
+t
+.I mp3enc -r
+expects big-endian.
 .SS Options
 .TF "\fB-b \fP"
 .TP
@@ -142,59 +180,139 @@ set sampling frequency of output file (in KHz) to
 .IR sfreq ,
 default is input sfreq.
 .TP
-.BI --mp3input
-.I input
+.BI --mp3input " input"
 is an MP3 file
 .
 .SS Silly options
 .TF --nohist
 .TP
-.BI -f
+.B -f
 same as
 .LR "-q 7" .
 Such a deal. 
 .TP
-.BI -o
+.B -o
 mark as non-original (i.e. do not set the original bit)
 .TP
-.BI -c
+.B -c
 mark as copyright
 .TP
-.BI -k
+.B -k
 disable sfb=21 cutoff
 .TP
 .BI -e " emp"
 de-emphasis n/5/c
 (default n)
 .TP
-.BI -d
+.B -d
 allow channels to have different blocktypes
 .TP
-.BI -t
+.B -t
 disable Xing VBR informational tag
 .TP
-.BI -a
+.B -a
 autoconvert from stereo to mono file for mono encoding
 .TP
-.BI -x
+.B -x
 force byte-swapping of input (see
 .IR dd (1)
 instead)
 .TP
-.BI -S
+.B -S
 don't print progress report, VBR histograms
 .TP
-.BI --athonly
+.B --athonly
 only use the ATH for masking
 .TP
-.BI --nohist
+.B --nohist
 disable VBR histogram display
 .TP
-.BI --voice
+.B --voice
 experimental voice mode
-.
+.SS
+.I Pcmconv
+is a helper program used to convert various PCM sample formats. The
+.B -i
+and
+.B -o
+options specify the input and output format
+.I fmt
+of the conversion.
+.I Fmt
+is a concatenated string of the following parts:
+.TP
+.BI s #
+sample format is little-endian signed integer where
+.I #
+specifies the number of bits
+.TP
+.BI u #
+unsigned little-endian integer format
+.TP
+.BI S #
+singed big-endian integer format
+.TP
+.BI U #
+unsigned big-endian integer format
+.TP
+.BI f #
+floating point format where
+.I #
+has to be 32 or 64 for single- or double-precision
+.TP
+.B a8
+8-bit a-law format
+.TP
+.B µ8
+8-bit µ-law format
+.TP
+.BI c #
+specifies the number of channels
+.TP
+.BI r #
+gives the samplerate in Hz
+.PP
+The program reads samples from standard
+input converting the data and writes the result to standard output
+until it reached end of file or, if
+.B -l
+was given, a number of
+.I length
+bytes have been consumed from input.
+.PP
+.I Mixfs
+is a fileserver serving a single
+.B audio
+file which allows simultaneous playback of audio streams. When
+run, it binds over
+.B /dev/audio
+and mixes the audio samples that are written to it.
+A service name
+.I srvname
+can be given with the
+.B -s
+option which gets posted to
+.BR /srv .
+By default,
+.I mixfs
+mounts itself on
+.B /mnt/mix
+and then binds
+.B /mnt/mix/audio
+over
+.BR /dev .
+A alternative mountpoint 
+.I mtpt
+can be specified with the
+.B -m
+option.
+The
+.B -D
+option causes
+.B 9p
+debug messages to be written to file-descriptor 2.
 .SH EXAMPLE
-Plays back a
+Play back an
 .L .mp3
 .IP
 .EX
@@ -206,7 +324,7 @@ Encode a
 file as highest-quality MP3.
 .IP
 .EX
-audio/mp3enc -q 0 -b 320
+audio/mp3enc -q 0 -b 320 <foo.wav >foo.mp3
 .EE
 .LP
 Create a fixed 128Kb/s MP3 file from a
@@ -236,5 +354,8 @@ dd -conv swab | audio/mp3enc -a -r -m m --resample 16 -b 24
 .B http://xiph.org/doc/
 .br
 .B http://flac.sourceforge.net/documentation.html
-.SH BUGS
-It's another GNU behemoth, lightly tamed.
+.SH HISTORY
+.I Pcmconv
+first appeared in 9front (December, 2012).
+.I Mixfs
+first appeared in 9front (December, 2013).