mirror of
http://mpg123.de/trunk/.git
synced 2025-10-25 04:37:34 +03:00
add --preframes, update documentation
git-svn-id: svn://scm.orgis.org/mpg123/trunk@2051 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
@@ -125,6 +125,14 @@ Do not accept ICY meta data.
|
||||
\fB\-i, \-\^-\index
|
||||
Index / scan through the track before playback.
|
||||
This fills the index table for seeking (if enabled in libmpg123) and may make the operating system cache the file contents for smoother operating on playback.
|
||||
.TP
|
||||
\fB\-\-index\-size \fIsize\fR
|
||||
Set the number of entries in the seek frame index table.
|
||||
.TP
|
||||
\fB\-\-preframes \fInum\fR
|
||||
Set the number of frames to be read as lead-in before a seeked-to position.
|
||||
This serves to fill the layer 3 bit reservoir, which is needed to faithfully reproduce a certain sample at a certain position.
|
||||
Note that for layer 3, a minimum of 1 is enforced (because of frame overlap), and for layer 1 and 2, this is limited to 2 (no bit reservoir in that case, but engine spin-up anyway).
|
||||
|
||||
.SH OUTPUT and PROCESSING OPTIONS
|
||||
.TP
|
||||
|
||||
@@ -112,6 +112,7 @@ struct parameter param = {
|
||||
,INDEX_SIZE
|
||||
,NULL /* force_encoding */
|
||||
,1. /* preload */
|
||||
,-1 /* preframes */
|
||||
};
|
||||
|
||||
mpg123_handle *mh = NULL;
|
||||
@@ -441,6 +442,7 @@ topt opts[] = {
|
||||
{0, "no-seekbuffer", GLO_INT, unset_frameflag, &frameflag, MPG123_SEEKBUFFER},
|
||||
{'e', "encoding", GLO_ARG|GLO_CHAR, 0, ¶m.force_encoding, 0},
|
||||
{0, "preload", GLO_ARG|GLO_DOUBLE, 0, ¶m.preload, 0},
|
||||
{0, "preframes", GLO_ARG|GLO_LONG, 0, ¶m.preframes, 0},
|
||||
{0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -724,6 +726,7 @@ int main(int argc, char *argv[])
|
||||
param.flags = (int) parr;
|
||||
param.flags |= MPG123_SEEKBUFFER; /* Default on, for HTTP streams. */
|
||||
mpg123_getpar(mp, MPG123_RESYNC_LIMIT, ¶m.resync_limit, NULL);
|
||||
mpg123_getpar(mp, MPG123_PREFRAMES, ¶m.preframes, NULL);
|
||||
|
||||
#ifdef OS2
|
||||
_wildcard(&argc,&argv);
|
||||
@@ -822,6 +825,8 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
&& ++libpar
|
||||
&& MPG123_OK == (result = mpg123_par(mp, MPG123_OUTSCALE, param.outscale, 0))
|
||||
&& ++libpar
|
||||
&& MPG123_OK == (result = mpg123_par(mp, MPG123_PREFRAMES, param.preframes, 0))
|
||||
))
|
||||
{
|
||||
error2("Cannot set library parameter %i: %s", libpar, mpg123_plain_strerror(result));
|
||||
@@ -1145,7 +1150,8 @@ static void long_usage(int err)
|
||||
fprintf(o," -Z --random full random play\n");
|
||||
fprintf(o," --no-icy-meta Do not accept ICY meta data\n");
|
||||
fprintf(o," -i --index index / scan through the track before playback\n");
|
||||
fprintf(o," --index-size change size of frame index\n");
|
||||
fprintf(o," --index-size <n> change size of frame index\n");
|
||||
fprintf(o," --preframes <n> number of frames to decode in advance after seeking (to keep layer 3 bit reservoir happy)\n");
|
||||
fprintf(o," --resync-limit <n> Set number of bytes to search for valid MPEG data; <0 means search whole stream.\n");
|
||||
fprintf(o,"\noutput/processing options\n\n");
|
||||
fprintf(o," -o <o> --output <o> select audio output module\n");
|
||||
|
||||
@@ -98,6 +98,7 @@ struct parameter
|
||||
long index_size; /* size of frame index */
|
||||
char *force_encoding;
|
||||
double preload; /* buffer preload size (fraction of full buffer) */
|
||||
long preframes;
|
||||
};
|
||||
|
||||
extern char *equalfile;
|
||||
|
||||
Reference in New Issue
Block a user