pkgsrc/audio/mad123/files/mad123.1
salo d9c935ace1 PKGREVISION++
Add manual page, sort bl3 inclusions.
2004-04-10 12:58:08 +00:00

147 lines
4.3 KiB
Groff

.\" $NetBSD: mad123.1,v 1.1 2004/04/10 12:58:08 salo Exp $
.\"
.\" Copyright (c) 2003 Lubomir Sedlacik
.\" 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.
.\"
.\" 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 7, 2003
.Dt mad123 1
.Os
.Sh NAME
.Nm mad123
.Nd play MPEG audio files
.Sh SYNOPSIS
.Nm
.Op Fl cq
.Op Fl b Ar size
.Op Fl f Ar device
.Op Ar file ...
.Sh DESCRIPTION
.Nm
is a command line MPEG audio files player using Robert Leslie's
.Dq libmad
fixed-point MP3 decoder library.
.Nm
is not meant to be a serious replacement for the ubiquitous
.Xr mpg123 1
program.
Instead, it is merely an experiment in using libmad.
.Pp
At the time
.Nm
was written, a couple of things set it apart from the command line player
supplied with libmad,
.Xr madplay 1 :
.Pp
.Bl -dash -offset indent
.It
Support for URL style pathnames.
.It
The audio output is double-buffered (currently about 10 seconds worth
at 44100Hz sample rate).
This means
.Nm
is much less susceptible to network/CPU loading compared to
.Xr madplay 1 .
.It
An intelligent `read-ahead' algorithm can be used to pre-buffer large
chunks of the input MPEG audio stream.
.It
Simple keyboard controls.
.It
Ctrl-C behaves like it does for
.Xr mpg123 1 .
.It
.Nm
can be installed setuid-root (don't worry, it drops privs very early on) so
that it can adjust the scheduling priorities of its two (sometimes three)
processes to be even less susceptible to jitter.
(The third process is used when the MP3 stream is being read from
an URL).
.El
.Sh OPTIONS
The following options are available:
.Bl -tag -offset indent
.It Fl b Ar size
Allocate a
.Ar size
bytes buffer which will be used to read-ahead large chunks of the
.Ar file
at a time.
The
.Ar file
will be played even when only a small amount of data has been read in, but
when the buffer fills, no more data will be read until the buffer has
drained to 'nearly' empty.
This behaviour is useful when playing files over a congested network or
when you'd like to spin down a laptop drive for as long as possible.
.It Fl c
Enable keyboard controls. Currently, the following keys are recognised:
.Pp
.Bl -tag -width 4n -offset indent -compact
.It Ic n
Skip to the next track.
.It Ic b
Skip to the previous track.
.It Ic r
Rewind to the start of the current track.
.It Ic p
Pause.
.It Ic q
Quit.
.El
.It Fl f Ar device
Set the audio device to be
.Ar device .
The default is
.Pa /dev/sound .
.It Fl q
Be quiet.
.El
.Sh EXAMPLES
Play all MP3 files from the current directory, enable keyboard controls and
set the read-ahead buffer to 2 MB:
.Pp
.Dl "mad123 -c -b 0x200000 *.mp3"
.Pp
Play an MP3 stream from an URL, set the read-ahead buffer to 512 kB, be quiet:
.Pp
.Dl "mad123 -q -b 0x80000 http://a.server/mp3s/thrash.mp3"
.Sh NOTES
A read-ahead buffer smaller than 100 kB is ineffective.
.Sh SEE ALSO
.Xr madplay 1 ,
.Xr mpg123 1
.Sh AUTHORS
The
.Nm
program was written by
.An Steve Woodford Aq mad123@mctavish.co.uk .
This manual page was written by
.An Lubomir Sedlacik Aq salo@NetBSD.org .
.Sh BUGS
There are very few command line options.
.br
Many more buffer parameters should be tweakable on the command line.
.br
Only the Artist and Title ID3 tags are shown, if available.