Audio-Play-MPG123

 view release on metacpan or  search on metacpan

mpg123/INSTALL  view on Meta::CPAN


(3)  If compilation was successful, type "make install" to
     install the binary and the manual page in /usr/local.

Have fun!

Some additional remarks:

 - There is currently no direct audio hardware support for some
   hardware and (of course) "generic" targets.  That means that you 
   have to use the "-s" commandline option to write the decoded audio 
   data to stdout.

 - On Solaris, use Sun's SparcWorks compiler ("make solaris")
   if at all possible.  It generates faster code than gcc, so
   use gcc only if there's no other way.

 - The macro "htons" causes a compiler warning in httpget.c
   (at least on FreeBSD 2.1.x).  This can be safely ignored.

 - For Solaris 2.4:  append the options "-L/usr/ucblib -lucb"

mpg123/common.c  view on Meta::CPAN

    static int bs[4] = { 0,384,1152,1152 };
    double tpf;

    tpf = (double) bs[fr->lay];
    tpf /= freqs[fr->sampling_frequency] << (fr->lsf);
    return tpf;
}

/*
 * Returns number of frames queued up in output buffer, i.e. 
 * offset between currently played and currently decoded frame.
 */

long compute_buffer_offset(struct frame *fr)
{
    long bufsize;
	
    /*
     * buffermem->buf[0] holds output sampling rate,
     * buffermem->buf[1] holds number of channels,
     * buffermem->buf[2] holds audio format of output.

mpg123/mpg123.1  view on Meta::CPAN

outputs them to stdout.
.IR file\^ / URL
is assumed to be an MPEG-1/2 audio bit stream.
.SH OPTIONS
.B mpg123
options may be either the traditional POSIX one letter options,
or the GNU style long options.  POSIX style options start with a
single ``\-'', while GNU long options start with ``\-\^\-''.
.TP
.BR \-t ", " \-\^\-test
Test mode.  The audio stream is decoded, but no output occurs.
.TP
.BR \-s ", " \-\^\-stdout
The decoded audio samples are written to standard output,
instead of playing them through the audio device.  This
option must be used if your audio hardware is not supported
by
.BR mpg123 .
The output format is raw (headerless) linear PCM audio data,
16 bit, stereo, host byte order.
.TP
.BR \-c ", " \-\^\-check
Check for filter range violations, and report them for each frame
if any occur.

mpg123/mpg123.1  view on Meta::CPAN

which turns buffering off.
.TP
\fB\-k \fInum\fR, \fB\-\^\-skip \fInum
Skip first
.I num
frames.  By default the decoding starts at the first frame.
.TP
\fB\-n \fInum\fR, \fB\-\^\-frames \fInum
Decode only
.I num
frames.  By default the complete stream is decoded.
.TP
\fB\-f \fIfactor\fR, \fB\-\^\-scale \fIfactor
Change scale factor (default: 32768).
.TP
\fB\-r \fIrate\fR, \fB\-\^\-rate \fIrate
Set sample rate (default: automatic).  You may want to
change this if you need a constant output rate independed of
the mpeg stream rate. mpg123 automagically converts the
rate (down/up sampling) . You should then combine 
this with \-\-stereo or \-\-mono.

mpg123/mpg123.h  view on Meta::CPAN

	unsigned long frames;
	unsigned long bytes;
	unsigned long scale;
	unsigned char toc[100];
};

struct parameter {
    int aggressive; /* renice to max. priority */
    int shuffle;	/* shuffle/random play */
    int remote;	/* remote operation */
    int outmode;	/* where to out the decoded sampels */
    int quiet;	/* shut up! */
    int xterm_title;  /* print filename in xterm title */
    long usebuffer;	/* second level buffer size */
    int tryresync;  /* resync stream after error */
    int verbose;    /* verbose level */
#ifdef TERM_CONTROL
    int term_ctrl;
#endif
    int force_mono;
    int force_stereo;



( run in 0.524 second using v1.01-cache-2.11-cpan-26ccb49234f )