2
scan: Estimate length (sample count) of a mpeg file and compare to length from exact scan.
4
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
5
see COPYING and AUTHORS files in distribution or http://mpg123.org
6
initially written by Thomas Orgis
9
/* Note the lack of error checking here.
10
While it would be nicer to inform the user about troubles, libmpg123 is designed _not_ to bite you on operations with invalid handles , etc.
11
You just jet invalid results on invalid operations... */
16
int _tmain(int argc, _TCHAR* argv[])
22
fprintf(stderr, "\nI will give you the estimated and exact sample lengths of MPEG audio files.\n");
23
fprintf(stderr, "\nUsage: %s <mpeg audio file list>\n\n", argv[0]);
27
m = mpg123_new(NULL, NULL);
28
mpg123_param(m, MPG123_RESYNC_LIMIT, -1, 0); /* New in library version 0.0.1 . */
29
for(i = 1; i < argc; ++i)
33
mpg123_topen(m, argv[i]);
41
printf("File %i: estimated %li vs. scanned %li\n", i, (long)a, (long)b);