Simulator first commit
This commit is contained in:
2
node_modules/lame/deps/mpg123/doc/ACCURACY
generated
vendored
Normal file
2
node_modules/lame/deps/mpg123/doc/ACCURACY
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
We do regular testing of ISO MPEG compliant decoder accuracy, automatic with snapshot generation each night at least, with results shown on the front page of http://mpg123.org .
|
||||
Since version 1.8.0, mpg123 really looks fine in that area... it's fast and sounds good;-)
|
110
node_modules/lame/deps/mpg123/doc/BENCHMARKING
generated
vendored
Normal file
110
node_modules/lame/deps/mpg123/doc/BENCHMARKING
generated
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
O-tone Michael Hipp: The mp3 benchmarking lie?
|
||||
----------------------------------------------
|
||||
|
||||
Let's write a few notes about benchmarking the different mp3 decoders,
|
||||
which are available. 'top' is NOT a benchmark, it's a simple check
|
||||
how a program performs. The sad thing with 'top' is, that it has some
|
||||
problems with the measurement of threaded programs of programs only
|
||||
requesting short chunks of processor time. So, the only real test is
|
||||
probably decoding a stream without threads with 100% CPU time and
|
||||
measure the time how long your machine needs for it.
|
||||
You can do this with mpg123 by doing a
|
||||
time mpg123 -t mp3stream.mp3
|
||||
or
|
||||
time mpg123 -s mp3stream.mp3 > /dev/null
|
||||
if you additionally want to measure the I/O time.
|
||||
|
||||
If you find a player, which claims to be 10 or even more times faster than the
|
||||
current players: just don't believe it. A factor of 2 MAY BE possible.
|
||||
|
||||
|
||||
Thomas's mpg123 decision process
|
||||
--------------------------------
|
||||
|
||||
I made some tests back then when I wondered if there is a point in using another "modern" mp3 decoder for my mixing daemon. This was around Dec. 2004 till Feb. 2005 with current versions (0.59r-thorX in the case of mpg123). What follows is a copy of the DECODERS file in the dermixd distribution:
|
||||
|
||||
What decoder should one use?
|
||||
|
||||
-----
|
||||
MP3
|
||||
-----
|
||||
|
||||
mpg123 is the old-fashioned way, uncertain license, may have some problems with extraordinary files (huge id3v2 tags, other specialities?), but fast. Has EQ control; interactive frontend interface (in parts hacked by me...).
|
||||
|
||||
mpg321: is popular these days... interface? speed?
|
||||
|
||||
madplay: is becoming popular these days, handles RVA2 by itself... can't provide an interface nor EQ
|
||||
|
||||
|
||||
speed:
|
||||
|
||||
decoding Dirty Guitar with NULL output, pentium-optimized (not more):
|
||||
|
||||
decoder user time/s
|
||||
mpg123 23
|
||||
madplay(hq) 46
|
||||
madplay(speed) 34
|
||||
mpg321(hq) 62
|
||||
mpg321(speed) 49
|
||||
|
||||
|
||||
So, there is still a strong technical point in using mpg123... even when my 366MHz-Laptop can easily handle several decoders at once with either of the programs, every percent cpu usage drags on the battery... and takes the cpu time from the real work
|
||||
|
||||
-----
|
||||
OGG
|
||||
-----
|
||||
|
||||
7,9M /tmp/dirty_guitar-q3.ogg
|
||||
11M /tmp/dirty_guitar-q5.ogg
|
||||
13M /tmp/dirty_guitar-q6.ogg
|
||||
15M /tmp/dirty_guitar-q7.ogg
|
||||
22M /tmp/dirty_guitar-q9.ogg
|
||||
29M /tmp/dirty_guitar-q10.ogg
|
||||
14M /tmp/dirty_guitar-std.mp3
|
||||
101M /tmp/dirty_guitar.wav
|
||||
|
||||
speed of ogg123:
|
||||
|
||||
quality user time/s
|
||||
3 31
|
||||
5 36
|
||||
6 38
|
||||
7 39
|
||||
10 55
|
||||
|
||||
So, with similar care as mpg123 concerning some (assembler?) optimization, ogg could well come close to "fast" mp3 decoding.
|
||||
Does ist sound better, then?
|
||||
|
||||
|
||||
A review from the new maintainer
|
||||
--------------------------------
|
||||
|
||||
Now it's 2006, 23th of July. Still the same laptop, still the same mp3 file.
|
||||
I just want to update the number for current mpg123 with the mmx optimization.
|
||||
I should also see if competition (well, ogg, at least?) improved in the year that passed... but looking only at mp3, that reduces to the question if mpg123 got faster or slower.
|
||||
Neither on the mpg321 site or the MAD site (ftp dir) did I find any new version. MAD is still 0.15.1b (0.15.2b for madplay), mpg321 still 0.2.10 .
|
||||
Well, I can look at mplayer's mpg123 spawn called mp3lib that has been taken care for over the time.
|
||||
But apart from that, will mpg123 stand alone on the field of console mp3 engines that are actively maintained???
|
||||
To have at least some twist, I now measured the output of raw data to stdout (to /dev/null) instead of decoding alone. The hardware and largely the software is still the same (now kernel 2.6.11 instead of 2.6.?).
|
||||
I've only used the "high quality" mad players - the earlier measurements give a hint about the difference to the "speed" variant.
|
||||
|
||||
mpg123-0.60-beta1, underworld_@_dirty_guitar.mp3
|
||||
|
||||
gcc-3.3.3
|
||||
CFLAGS=-O2 -finline-functions -march=pentium2
|
||||
built with the new autoconf/make system
|
||||
machine in X11 running fluxbox, no active load (like a year ago)
|
||||
measuring second run (with cached file)
|
||||
|
||||
time for -s > /dev/null decode...
|
||||
pentium: 24s
|
||||
pentium, MMX: 19s
|
||||
pentium, MMX, gapless (runtime-disabled): 19s
|
||||
pentium, MMX, gapless (also runtime-enabled): 19s
|
||||
mpg321 0.2.10, high quality: 64s
|
||||
madplay 0.15.2b, high quality: 56s
|
||||
|
||||
With the file length being m:s 9:58 (598s), for mpg123 that makes theoretical realtime cpu 3-4% for the PII-366.
|
||||
Incidentally, `top` agrees there: it shows 3.0-3.3% CPU usage for the MMX/gapless binary during normal OSS playback.
|
||||
|
||||
I feel unable to benchmark the mp3 playback of mplayer - I don't see an option to make it decode audio as fast as possible (I only know -benhcmark and -noaudio; with esp. the latter not helping me there).
|
3
node_modules/lame/deps/mpg123/doc/BUGS
generated
vendored
Normal file
3
node_modules/lame/deps/mpg123/doc/BUGS
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
If you find a bug, please check for and report it in the sourceforge bug tracking system:
|
||||
|
||||
http://sourceforge.net/tracker/?atid=733194&group_id=135704&func=browse
|
17
node_modules/lame/deps/mpg123/doc/CONTACT
generated
vendored
Normal file
17
node_modules/lame/deps/mpg123/doc/CONTACT
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
If you have a problem with some mp3 file or with your platform that should be supported by mpg123, please post on the mpg123 user mailing list
|
||||
|
||||
mpg123-users@lists.sourceforge.net
|
||||
|
||||
Any ideas for feature improvements or any other suggestions concerning development may be better placed at
|
||||
|
||||
mpg123-devel@lists.sourceforge.net
|
||||
|
||||
If you don't want to subscribe to these, you can also drop a note to
|
||||
|
||||
maintainer@mpg123.org
|
||||
|
||||
But if you want to subscribe and participate in the open discussion or just browse the mailing list archives, see
|
||||
|
||||
http://sourceforge.net/mail/?group_id=135704
|
||||
|
||||
(or just http://sourceforge.net/projects/mpg123 and click through).
|
22
node_modules/lame/deps/mpg123/doc/LICENSE
generated
vendored
Normal file
22
node_modules/lame/deps/mpg123/doc/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
GNU says that the license terms go into a file called COPYING.
|
||||
Go over to COPYING to read the license, then.
|
||||
|
||||
Or...
|
||||
|
||||
You stay a bit with me here and read some not really important text.
|
||||
You could imagine that there was some important text here, though.
|
||||
You could also imagine that you were not sitting
|
||||
in your office / living room / bathroom
|
||||
in front of one of these evil electronic brains
|
||||
(you didn't _print_ this file, did you?)
|
||||
but being at some happy place, far, far away.
|
||||
You could also imagine being at some unhappy place.
|
||||
If you indeed are at such an unhappy place, imagine you were sitting
|
||||
in your office / living room / bathroom
|
||||
in front of this shiny, though evil, electronic brain.
|
||||
Reading this pointless text.
|
||||
Wondering about what you could have achieved in the past moments
|
||||
if you wouldn't have continued reading this pointless text.
|
||||
Wondering if anything is worth being achieved at all.
|
||||
Or if it all is just...
|
||||
pointless.
|
32
node_modules/lame/deps/mpg123/doc/Makefile.am
generated
vendored
Normal file
32
node_modules/lame/deps/mpg123/doc/Makefile.am
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
## Makefile.am: produce Makefile.in from this
|
||||
|
||||
## copyright by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
## see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
## initially written by Nicholas J. Humfrey
|
||||
|
||||
|
||||
EXTRA_DIST = \
|
||||
BENCHMARKING \
|
||||
BUGS \
|
||||
CONTACT \
|
||||
PATENTS \
|
||||
README.3DNOW \
|
||||
README.gain \
|
||||
README.remote \
|
||||
ROAD_TO_LGPL \
|
||||
TODO \
|
||||
LICENSE \
|
||||
THANKS \
|
||||
ACCURACY \
|
||||
libmpg123_speed.txt \
|
||||
doxyhead.xhtml \
|
||||
doxy_examples.c \
|
||||
doxygen.conf \
|
||||
examples/mpg123_to_wav.c \
|
||||
examples/scan.c \
|
||||
examples/mpglib.c \
|
||||
examples/id3dump.c \
|
||||
examples/feedseek.c \
|
||||
examples/dump_seekindex.c \
|
||||
examples/extract_frames.c \
|
||||
examples/Makefile
|
490
node_modules/lame/deps/mpg123/doc/Makefile.in
generated
vendored
Normal file
490
node_modules/lame/deps/mpg123/doc/Makefile.in
generated
vendored
Normal file
@ -0,0 +1,490 @@
|
||||
# Makefile.in generated by automake 1.12.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in THANKS TODO
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/addrconfig.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AIX_CFLAGS = @AIX_CFLAGS@
|
||||
AIX_LDFLAGS = @AIX_LDFLAGS@
|
||||
AIX_LIBS = @AIX_LIBS@
|
||||
ALIB_CFLAGS = @ALIB_CFLAGS@
|
||||
ALIB_LDFLAGS = @ALIB_LDFLAGS@
|
||||
ALIB_LIBS = @ALIB_LIBS@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LDFLAGS = @ALSA_LDFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
API_VERSION = @API_VERSION@
|
||||
AR = @AR@
|
||||
ARTS_CFLAGS = @ARTS_CFLAGS@
|
||||
ARTS_LDFLAGS = @ARTS_LDFLAGS@
|
||||
ARTS_LIBS = @ARTS_LIBS@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
COREAUDIO_CFLAGS = @COREAUDIO_CFLAGS@
|
||||
COREAUDIO_LDFLAGS = @COREAUDIO_LDFLAGS@
|
||||
COREAUDIO_LIBS = @COREAUDIO_LIBS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DECODER_LOBJ = @DECODER_LOBJ@
|
||||
DECODER_OBJ = @DECODER_OBJ@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMMY_CFLAGS = @DUMMY_CFLAGS@
|
||||
DUMMY_LDFLAGS = @DUMMY_LDFLAGS@
|
||||
DUMMY_LIBS = @DUMMY_LIBS@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ESD_CFLAGS = @ESD_CFLAGS@
|
||||
ESD_LDFLAGS = @ESD_LDFLAGS@
|
||||
ESD_LIBS = @ESD_LIBS@
|
||||
EXEC_LT_LDFLAGS = @EXEC_LT_LDFLAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HP_CFLAGS = @HP_CFLAGS@
|
||||
HP_LDFLAGS = @HP_LDFLAGS@
|
||||
HP_LIBS = @HP_LIBS@
|
||||
INCLUDE_STDIO_H = @INCLUDE_STDIO_H@
|
||||
INCLUDE_STDLIB_H = @INCLUDE_STDLIB_H@
|
||||
INCLUDE_SYS_TYPE_H = @INCLUDE_SYS_TYPE_H@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
JACK_CFLAGS = @JACK_CFLAGS@
|
||||
JACK_LDFLAGS = @JACK_LDFLAGS@
|
||||
JACK_LIBS = @JACK_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LFS_LOBJ = @LFS_LOBJ@
|
||||
LIBMPG123_VERSION = @LIBMPG123_VERSION@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_LDFLAGS = @LT_LDFLAGS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MINT_CFLAGS = @MINT_CFLAGS@
|
||||
MINT_LDFLAGS = @MINT_LDFLAGS@
|
||||
MINT_LIBS = @MINT_LIBS@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MODULE_OBJ = @MODULE_OBJ@
|
||||
NAS_CFLAGS = @NAS_CFLAGS@
|
||||
NAS_LDFLAGS = @NAS_LDFLAGS@
|
||||
NAS_LIBS = @NAS_LIBS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENAL_CFLAGS = @OPENAL_CFLAGS@
|
||||
OPENAL_LDFLAGS = @OPENAL_LDFLAGS@
|
||||
OPENAL_LIBS = @OPENAL_LIBS@
|
||||
OS2_CFLAGS = @OS2_CFLAGS@
|
||||
OS2_LDFLAGS = @OS2_LDFLAGS@
|
||||
OS2_LIBS = @OS2_LIBS@
|
||||
OSS_CFLAGS = @OSS_CFLAGS@
|
||||
OSS_LDFLAGS = @OSS_LDFLAGS@
|
||||
OSS_LIBS = @OSS_LIBS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
OUTPUT_CFLAGS = @OUTPUT_CFLAGS@
|
||||
OUTPUT_LDFLAGS = @OUTPUT_LDFLAGS@
|
||||
OUTPUT_LIBS = @OUTPUT_LIBS@
|
||||
OUTPUT_MOD = @OUTPUT_MOD@
|
||||
OUTPUT_OBJ = @OUTPUT_OBJ@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@
|
||||
PORTAUDIO_LDFLAGS = @PORTAUDIO_LDFLAGS@
|
||||
PORTAUDIO_LIBS = @PORTAUDIO_LIBS@
|
||||
PULSE_CFLAGS = @PULSE_CFLAGS@
|
||||
PULSE_LDFLAGS = @PULSE_LDFLAGS@
|
||||
PULSE_LIBS = @PULSE_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_LDFLAGS = @SDL_LDFLAGS@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SGI_CFLAGS = @SGI_CFLAGS@
|
||||
SGI_LDFLAGS = @SGI_LDFLAGS@
|
||||
SGI_LIBS = @SGI_LIBS@
|
||||
SHELL = @SHELL@
|
||||
SNDIO_CFLAGS = @SNDIO_CFLAGS@
|
||||
SNDIO_LDFLAGS = @SNDIO_LDFLAGS@
|
||||
SNDIO_LIBS = @SNDIO_LIBS@
|
||||
STRIP = @STRIP@
|
||||
SUN_CFLAGS = @SUN_CFLAGS@
|
||||
SUN_LDFLAGS = @SUN_LDFLAGS@
|
||||
SUN_LIBS = @SUN_LIBS@
|
||||
VERSION = @VERSION@
|
||||
WIN32_CFLAGS = @WIN32_CFLAGS@
|
||||
WIN32_LDFLAGS = @WIN32_LDFLAGS@
|
||||
WIN32_LIBS = @WIN32_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = \
|
||||
BENCHMARKING \
|
||||
BUGS \
|
||||
CONTACT \
|
||||
PATENTS \
|
||||
README.3DNOW \
|
||||
README.gain \
|
||||
README.remote \
|
||||
ROAD_TO_LGPL \
|
||||
TODO \
|
||||
LICENSE \
|
||||
THANKS \
|
||||
ACCURACY \
|
||||
libmpg123_speed.txt \
|
||||
doxyhead.xhtml \
|
||||
doxy_examples.c \
|
||||
doxygen.conf \
|
||||
examples/mpg123_to_wav.c \
|
||||
examples/scan.c \
|
||||
examples/mpglib.c \
|
||||
examples/id3dump.c \
|
||||
examples/feedseek.c \
|
||||
examples/dump_seekindex.c \
|
||||
examples/extract_frames.c \
|
||||
examples/Makefile
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
39
node_modules/lame/deps/mpg123/doc/PATENTS
generated
vendored
Normal file
39
node_modules/lame/deps/mpg123/doc/PATENTS
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
Some notes about patents and mpg123 by Thomas Orgis
|
||||
---------------------------------------------------
|
||||
|
||||
There has been a lot of confusion over mp3 (or more generic mpeg audio) patents and licensing issues due to the patents held by Fraunhofer and marketed by Thomson.
|
||||
So, yes, there are patents held by Fraunhofer that are claimed to cover mpeg audio technology. There are also claims that they cover any similar technology (like OGG).
|
||||
You may argue if these patents are valid at all (being illegal software patents, or being preceeded by known scientific publications), but they are internationally accepted by patent authorities and if you want to use mp3 commercially you should check
|
||||
|
||||
http://www.mp3licensing.org
|
||||
|
||||
for the Fraunhofer/Thomson opinion and their terms.
|
||||
|
||||
Since mpg123 is only a mpeg audio player, a good deal of patents that describe the encoding process (the tricky part) will not apply.
|
||||
Also, statements from the patent holders up to now always allowed the non-commercial distribution of mpeg audio decoders without any fee.
|
||||
They want you to pay for a license when you want to make money by selling a decoder, though. We don't sell mpg123.
|
||||
Additionally, one should not forget the fact that the ideas are getting old; the basic (funded by government, btw.) research was somewhen back around the 80s and many patents are going to expire soon, best example in Germany:
|
||||
|
||||
P/DE 35 06 912 Method of transmission of an audio signal using grouping of amplitude values
|
||||
|
||||
Application was 22.02.1986 in Germany (and around Europe in the same time Jan/Feb 1986).
|
||||
German patents last 20 years... now we have 24.07.2006. Time has come...
|
||||
|
||||
The idea of a patent is to make the inventor open the invention to the public by giving him some safe time to turn this invention into economical benefit.
|
||||
People using (and improving!) the technology freely after that time is _the_ most important aspect of that idea.
|
||||
|
||||
Oh, I should mention the "core" mp3 patent (from http://gauss.ffii.org/PatentView/EP287578):
|
||||
|
||||
DE 3629434 / EP287578 Digital coding process
|
||||
|
||||
Application date in Germany was 29.08.1986 - that means that in a month from now (remember: 24.07.2006) this patent finds its natural end.
|
||||
|
||||
Then, there are other patents listed on the Fraunhofer/Thomson website that came very late... The one about join stereo coding was aplied for in Feb 1995. Did mpg123 implement that already back then? History is a bit blurry there...
|
||||
There is a patent applied for in 1997, but probably covering encoding only. Still, even if that weren't the case - the basic decoding functionality of mpg123 didn't change that much after 1997; and they couldn't have patented existing functionality.
|
||||
In general, few patents seem to cover decoders at all. Of course, with me being no lawyer, that statement is not trustworthy...
|
||||
|
||||
Bottom line is:
|
||||
|
||||
While Fraunhofer/Thomson don't want to charge free software players - they said that a long time ago, the time for they being able to place such charges is expiring or has already expired. One should really think before adding mp3pro/surround support to mpg123, though, since there are for sure more recent patents for that.
|
||||
|
||||
And don't forget: The progress bar is covered by a patent, too.
|
56
node_modules/lame/deps/mpg123/doc/README.3DNOW
generated
vendored
Normal file
56
node_modules/lame/deps/mpg123/doc/README.3DNOW
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
************************************************************************
|
||||
* 3DNow! support by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> *
|
||||
* <kim@comtec.co.jp> *
|
||||
* (http://hannah.ipc.miyakyo-u.ac.jp/kim/) *
|
||||
* Syuuhei Kashiyama <squash@mb.kcom.ne.jp> *
|
||||
* (http://user.ecc.u-tokyo.ac.jp/~g810370/)*
|
||||
************************************************************************
|
||||
|
||||
-----------------------------
|
||||
What's new in patch for 0.59r
|
||||
-----------------------------
|
||||
- 3DNow! optimized decode routine (decode_3dnow.s,dct36_3dnow.s ;
|
||||
these code based Syuuhei Kashiyama's 3DNow! patch for mpg123-0.59o)
|
||||
- 3DNow! optimized equalizer (equalizer_3dnow.s ; do_equalizer() only)
|
||||
- target "linux-3dnow-alsa" "linux-3dnow-esd" added (untested)
|
||||
- automatic detect 3DNow! support CPU from CPUFLAGS (getcpuflags.s)
|
||||
(i.e. use floating-pointer decode routine if your CPU isn't support
|
||||
3DNow! or MMX instructions)
|
||||
|
||||
-------------
|
||||
Added options
|
||||
-------------
|
||||
"--test-3dnow" : display result of autodetect and exit
|
||||
"--force-3dnow" : force use of 3DNow! optimized decoder
|
||||
(it will cause SIGILL if your CPU isn't support 3DNow! or MMX
|
||||
instructions)
|
||||
"--no-3dnow" : force use of floating-pointer decoder
|
||||
|
||||
-----------
|
||||
How to make
|
||||
-----------
|
||||
[1] To make 3DNow! optimized mpg123,you need binutils-2.9.1.0.15 or later.
|
||||
You can find the most recent binutils (2.9.1.0.25 until 23.Jun.1999) at
|
||||
- kernel.org (and mirrors) : /pub/linux/devel/gcc/
|
||||
- http://hannah.ipc.miyakyo-u.ac.jp/kim/Linux/binutils/
|
||||
(Takuhiro's local copy)
|
||||
etc.
|
||||
[2] Type "make linux-3dnow" (OSS)
|
||||
or "make linux-3dnow-alsa" (ALSA).
|
||||
[3] Enjoy!
|
||||
|
||||
------------------
|
||||
Precompiled binary
|
||||
------------------
|
||||
You can get precompiled binary of mpg123 (with 3DNow! support) from
|
||||
http://hannah.ipc.miyakyo-u.ac.jp/kim/Linux/mpg123/
|
||||
|
||||
----------
|
||||
References
|
||||
----------
|
||||
Useful sources of information on optimizing 3DNow! code include:
|
||||
- AMD 3DNow! Technology Manual (Publication #21928)
|
||||
English: http://www.amd.com/K6/k6docs/pdf/21928d.pdf
|
||||
(Japanese: http://www.amd.com/japan/K6/k6docs/j21928c.pdf)
|
||||
- AMD-K6-2 Processor Code Optimization Application Note (Publication #21924)
|
||||
English: http://www.amd.com/K6/k6docs/pdf/21924b.pdf
|
171
node_modules/lame/deps/mpg123/doc/README.gain
generated
vendored
Normal file
171
node_modules/lame/deps/mpg123/doc/README.gain
generated
vendored
Normal file
@ -0,0 +1,171 @@
|
||||
Thomas Orgis on RVA, Gain and Pain
|
||||
|
||||
|
||||
Ok, so I'm going to add RVA/ReplayGain support... the problem there is not to read these valus from ID3 or Lame, not even to do the adjustment itself.
|
||||
The problem is more to figure out how to interpret the dB values one gets there.
|
||||
|
||||
Main players in the field of relative volume adjustment / soft gain (without modifying actual audio data):
|
||||
|
||||
http://www1.cs.columbia.edu/~cvaill/normalize/
|
||||
...writing RVA2 ID3v2tags for dB offset to user target amplitude, default being -12dB(FS)
|
||||
http://www.replaygain.org/
|
||||
...store the difference to reference of 83dB(SPL) ... somewhere
|
||||
|
||||
Both calculate some running RMS and do statistics with this - the main difference is the potentially different target level.
|
||||
Also both know two basic types of adjustment: Per track to make all tracks sound at the same sevel (track / radio) and the one with default meaning to keep the loudness relations over albums (batch / audiophile).
|
||||
|
||||
dB can mean many things and also the raw value of a PCM sample doesn't equal directly to loudness (power of a wave != amplitude).
|
||||
|
||||
So that says the ReplayGain about applying the adjustment:
|
||||
|
||||
scale=10.^(replay_gain/20);
|
||||
|
||||
luckily, this is the same that I worked out on my own for the normalize RVA values in my mixplayer script:
|
||||
|
||||
return 10**($s/20);
|
||||
|
||||
I'll take that interpretaion of dB -> linear scale factor for samples for granted, then.
|
||||
|
||||
The replay_gain value is meant in the standard to represent the offset to 83dB(SPL - depending on your amplifier...), having in mind that actual most wanted average playback level should be 83dB(SPL) (defined by movie ppl as the loudness of a -20dB(FS) signal, leaving room for louder stuff).
|
||||
But then there is the proposal to add 6dB preamp for pop music - am I judging music types with mpg123??
|
||||
These 6dB are in fact the real world since lots of programs use 89dB(SPL...) as reference.
|
||||
Thus, lame since 3.95.1 (according to MADplay's Rob Leslie who discussed with Lame ppl, verified in 3.96 source) stores the adjustment to 89dB.
|
||||
To make that all sound the same, one should add 6bB to lame <3.95.1 ReplayGain values and use later ones verbatim - achieving 89dB everytime, whatever that may mean in reality out of my speakers (my Marantz' volume knob doesn't have a scale at all - be it dB or percent;-).
|
||||
|
||||
A funny aspect of this 6dB issue is to tell lame 3.95.1 from lame 3.95
|
||||
|
||||
As for normalize... the desired playback level is essentially undefined. Ignoring that and realizing that mpg123 has no way to determine real world sound power anyway, one has to just take the provided dB values and apply with the formula above.
|
||||
The user is responsible for providing files with his desired settings... for that reason I also won't follow the ReplayGain demand/suggestion that a player should apply an average of gains of previous tracks if the current one lacks a setting.
|
||||
|
||||
So, well. Considering that ReplayGain (at least the radio one) being stored by current lame on encoding, I suppose that if there are RVA2 values in ID3v2 tags, these were added by a conscious user act and are overriding the ReplayGain ones.
|
||||
|
||||
I already read ReplayGain entries in Lame tag... should add ID3v2 parsing. Especially since the lame tag is ambignous because of the 6dB issue... I cannot distinguish 3.95.1 from 3.95 by reading the tag - frick!
|
||||
But wait... 6dB?
|
||||
|
||||
[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.96.1]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man_lame-3.96.1.mp3
|
||||
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
|
||||
LAME version 3.96.1 (http://lame.sourceforge.net/)
|
||||
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
|
||||
Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3
|
||||
to ../testfiles/happy_man_lame-3.96.1.mp3
|
||||
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
|
||||
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
|
||||
6371/6374 (100%)| 1:41/ 1:41| 1:47/ 1:47| 1.6353x| 0:00
|
||||
average: 128.0 kbps LR: 754 (11.83%) MS: 5620 (88.17%)
|
||||
|
||||
Writing LAME Tag...done
|
||||
ReplayGain: -7.4dB
|
||||
revmethod = 1
|
||||
encoder padding: 1728
|
||||
|
||||
[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.95.1]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man.mp3
|
||||
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
|
||||
LAME version 3.95 (http://www.mp3dev.org/)
|
||||
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
|
||||
Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3
|
||||
to ../testfiles/happy_man.mp3
|
||||
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
|
||||
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
|
||||
6371/6374 (100%)| 1:36/ 1:36| 1:48/ 1:48| 1.7289x| 0:00
|
||||
average: 128.0 kbps LR: 759 (11.91%) MS: 5615 (88.09%)
|
||||
|
||||
Writing LAME Tag...done
|
||||
ReplayGain: -7.4dB
|
||||
|
||||
[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.95]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man_lame-3.95.mp3
|
||||
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
|
||||
LAME version 3.95 (http://www.mp3dev.org/)
|
||||
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
|
||||
Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3
|
||||
to ../testfiles/happy_man_lame-3.95.mp3
|
||||
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
|
||||
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
|
||||
6371/6374 (100%)| 1:37/ 1:37| 1:43/ 1:43| 1.7041x| 0:00
|
||||
average: 128.0 kbps LR: 759 (11.91%) MS: 5615 (88.09%)
|
||||
|
||||
Writing LAME Tag...done
|
||||
ReplayGain: -13.4dB
|
||||
|
||||
|
||||
Together with the gain values read from tags:
|
||||
|
||||
3.96.1: -1.0dB (claimed -7.4dB)
|
||||
3.95: -1.0dB (claimed -7.4dB)
|
||||
3.95: -0.6dB (claimed -13.4dB)
|
||||
|
||||
So, the difference of 6dB shows in the values lame prints on the command line... but the lame tags only have 0.4dB difference and are much lower anyway - do I parse them correctly?
|
||||
|
||||
Opinion of normalize of these files: -2dB. Great. I guess the -1 is what lame really meant, then...
|
||||
|
||||
|
||||
Storage places
|
||||
==============
|
||||
|
||||
Points 1, 2 and 4 implemented to some respect.
|
||||
|
||||
|
||||
1. Lame/Info tag
|
||||
|
||||
supposedly in format according to the proposed standard - but I yet have to verify if Lame really does this.
|
||||
see http://gabriel.mp3-tech.org/mp3infotag.html
|
||||
|
||||
|
||||
2. ID3v2 RVA2 frame(s)
|
||||
|
||||
Normalize does that. Rare is the software reading that.
|
||||
I've never seen those frames since id3v2 -l doesn't know them.
|
||||
|
||||
|
||||
3. APE tags
|
||||
|
||||
Gah, another Tag format. Foobar2000 uses this as default.
|
||||
It's getting real-hy messy folks
|
||||
|
||||
|
||||
4. Per convention in ID3 tags
|
||||
|
||||
Well, I myself once used the ID3v1 comment field for storing the mix rva value (textual) ... but that is a tad too unspecific.
|
||||
I then also used user-defined ID3v2 comments like that:
|
||||
|
||||
[thomas@thorvas /home/thomas-data/mpg123-neu/svn/trunk]$ id3v2 -l /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3
|
||||
id3v1 tag info for /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3:
|
||||
Title : banstyle sappys curry Artist: underworld
|
||||
Album : second toughest in the infants Year: 0 , Genre: Other (12)
|
||||
Comment: Created by Grip Track: 2
|
||||
id3v2 tag info for /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3:
|
||||
TYER (Year): 0
|
||||
TRCK (Track number/Position in set): 2
|
||||
COMM (Comments): (ID3v1 Comment)[XXX]: Created by Grip
|
||||
TCON (Content type): Other (12)
|
||||
TPE1 (Lead performer(s)/Soloist(s)): underworld
|
||||
TALB (Album/Movie/Show title): second toughest in the infants
|
||||
TIT2 (Title/songname/content description): banstyle sappys curry
|
||||
COMM (Comments): (RVA)[]: 4.3291
|
||||
COMM (Comments): (RVA_ALBUM)[]: 3.666101
|
||||
|
||||
That still doesn't look like a bad Idea to me. Not bothering with byte ordering and whatnot. Just atof(id3v2_comm_rva).
|
||||
One could still add dB, though.
|
||||
|
||||
Another convention is (rockbox mailinglist, not checked myself) used by Foobar:
|
||||
|
||||
TXXX (User defined text information): (replaygain_track_gain): -7.17 dB
|
||||
TXXX (User defined text information): (replaygain_track_peak): 1.057122
|
||||
TXXX (User defined text information): (replaygain_album_gain): -6.53 dB
|
||||
TXXX (User defined text information): (replaygain_album_peak): 1.107456
|
||||
|
||||
So what are custom comment fields for when there are also custom text fields? They look very similar to me.
|
||||
|
||||
|
||||
5. Leave the haunted music file alone and store metadata externally.
|
||||
|
||||
That's the only sane way for stuff like album art... and it's the way I do it in my music archive. the wrapper script reads the adjustment values and then sets an adjusted volume.
|
||||
That's fine for my mixing daemon that manupulates the pcm data anyway, but it would be nice to have this functionality in the minimalist console mode. too.
|
||||
Even more since it can be done without additional cpu power during decoding (well, one-time set up of the decode tables is needed for every track) similar to the equalizer.
|
||||
I could simply start with text files with lines like
|
||||
|
||||
RVA_MIX: 3.4dB
|
||||
RVA_ALBUM: 1.7dB
|
||||
|
||||
Prob here is that the effort to open and parse that extra file may hinder gapless decoding between tracks...
|
||||
Well, one could parse all metadata files for a list of tracks before playback starts.
|
||||
But all this won't work for streams via stdin (hm, one could argue if the stream needs RVA at all).
|
218
node_modules/lame/deps/mpg123/doc/README.remote
generated
vendored
Normal file
218
node_modules/lame/deps/mpg123/doc/README.remote
generated
vendored
Normal file
@ -0,0 +1,218 @@
|
||||
Control interface to generic frontends
|
||||
|
||||
The generic remote interface allows frontends to easily control
|
||||
mpg123 by commands through stdin/stdout. To start the generic
|
||||
remote interface, start mpg123 with parameter -R.
|
||||
|
||||
In case of a frontend that starts mpg123 with the -s option to read the audio from stdout, the --remote-err option is automatically activated to send responses to stderr so that stdout stays clean for audio.
|
||||
|
||||
(Still the case?)
|
||||
As an example it's used by IRMP3, a tool that allows you to
|
||||
control mpg123 with a standard infrared remote control. See
|
||||
http://www.fasta.fh-dortmund.de/users/andy/irmp3/ for more
|
||||
information.
|
||||
|
||||
You can also specify --fifo <path> to create a named pipe at <path> and listen on that for commands instead stdin.
|
||||
That way, you can deliberately control mpg123 by echoing into the named pipe from any terminal / program.
|
||||
The command respones are still sent to standard out or standard error (depending on -s or --remote-err switches).
|
||||
|
||||
|
||||
COMMAND CODES
|
||||
-------------
|
||||
|
||||
You can get this info via the control command "help".
|
||||
|
||||
HELP/H: command listing (LONG/SHORT forms), command case insensitve
|
||||
|
||||
LOAD/L <trackname>: load and start playing resource <trackname>
|
||||
|
||||
LOADPAUSED/LP <trackname>: load but do not start playing resource <trackname>
|
||||
|
||||
LOADLIST <entry> <url>: load a playlist from given <url>, and display its entries, optionally load and play one of these specificed by the integer <entry> (<0: just list, 0: play last track, >0:play track with that position in list)
|
||||
|
||||
PAUSE/P: pause playback
|
||||
|
||||
STOP/S: stop playback (closes file)
|
||||
|
||||
JUMP/J <frame>|<+offset>|<-offset>|<[+|-]seconds>s: jump to mpeg frame <frame> or change position by offset, same in seconds if number followed by "s"
|
||||
|
||||
VOLUME/V <percent>: set volume in % (0..100...); float value
|
||||
|
||||
RVA off|(mix|radio)|(album|audiophile): set rva mode
|
||||
|
||||
EQ/E <channel> <band> <value>: set equalizer value for frequency band 0 to 31 on channel 1 (left) or 2 (right) or 3 (both)
|
||||
|
||||
EQFILE <filename>: load EQ settings from a file
|
||||
|
||||
SHOWEQ: show all equalizer settings (as <channel> <band> <value> lines in a SHOWEQ block (like TAG))
|
||||
|
||||
SEEK/K <sample>|<+offset>|<-offset>: jump to output sample position <samples> or change position by offset
|
||||
|
||||
SCAN: scan through the file, building seek index
|
||||
|
||||
SAMPLE: print out the sample position and total number of samples
|
||||
|
||||
SEQ <bass> <mid> <treble>: simple eq setting...
|
||||
|
||||
PITCH <[+|-]value>: adjust playback speed (+0.01 is 1 % faster)
|
||||
|
||||
SILENCE: be silent during playback (meaning silence in text form)
|
||||
|
||||
STATE: Print auxilliary state info in several lines (just try it to see what info is there).
|
||||
|
||||
TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names.
|
||||
The output is multiple lines, begin marked by "@T {", end by "@T }".
|
||||
ID3v1 data is like in the @I info lines (see below), just with "@T" in front.
|
||||
An ID3v2 data field is introduced via ([ ... ] means optional):
|
||||
@T ID3v2.<NAME>[ [lang(<LANG>)] desc(<description>)]:
|
||||
The lines of data follow with "=" prefixed:
|
||||
@T =<one line of content in UTF-8 encoding>
|
||||
meaning of the @S stream info:
|
||||
|
||||
S <mpeg-version> <layer> <sampling freq> <mode(stereo/mono/...)> <mode_ext> <framesize> <stereo> <copyright> <error_protected> <emphasis> <bitrate> <extension> <vbr(0/1=yes/no)>
|
||||
The @I lines after loading a track give some ID3 info, the format:
|
||||
@I ID3:artist album year comment genretext
|
||||
where artist,album and comment are exactly 30 characters each, year is 4 characters, genre text unspecified.
|
||||
You will encounter "@I ID3.genre:<number>" and "@I ID3.track:<number>".
|
||||
Then, there is an excerpt of ID3v2 info in the structure
|
||||
@I ID3v2.title:Blabla bla Bla
|
||||
for every line of the "title" data field. Likewise for other fields (author, album, etc).
|
||||
|
||||
|
||||
RESPONSE CODES
|
||||
--------------
|
||||
|
||||
Note: mpg123 returns errors on stderr, so your frontend should
|
||||
look not only at stdout but also at stderr for responses.
|
||||
It is a good idea to use --remote-err and just look at stderr.
|
||||
|
||||
@R MPG123 (ThOr) v7
|
||||
Startup version message. Everything after MPG123 is auxilliary information about behaviour and command support, ID3v2 tag support is new in v3.
|
||||
|
||||
@I ID3:<a><b><c>
|
||||
Status message after loading a song (ID3 song info)
|
||||
a = title (exactly 30 chars)
|
||||
b = artist (exactly 30 chars)
|
||||
c = album (exactly 30 chars)
|
||||
d = year (exactly 4 chars)
|
||||
e = comment (exactly 30 chars)
|
||||
f = genre (string)
|
||||
|
||||
@I ID3.genre:<number>
|
||||
@I ID3.track:<number>
|
||||
Optional lines with additional ID3v1 info (if present): Genre ID and track number in set.
|
||||
|
||||
@I ID3v2.title:<text>
|
||||
After loading a track with ID3v2 info, such lines occur for every line of the "title" data field and likewise for other fields (author, album, etc).
|
||||
|
||||
@I <a>
|
||||
Status message after loading a song (no ID3 song info)
|
||||
a = filename without path and extension
|
||||
|
||||
@I LISTENTRY <n>: <url>
|
||||
printout of playlists loaded with LOADLIST
|
||||
|
||||
@S <a> <b> ...
|
||||
Stream info at beginning of playback, meaning
|
||||
S <mpeg-version> <layer> <sampling freq> <mode(stereo/mono/...)> <mode_ext> <framesize> <stereo> <copyright> <error_protected> <emphasis> <bitrate> <extension> <vbr(0/1=yes/no)>
|
||||
|
||||
@S <a> <b> <c> <d> <e> <f> <g> <h> <i> <j> <k> <l>
|
||||
Status message after loading a song (stream info)
|
||||
a = mpeg type (string)
|
||||
b = layer (int)
|
||||
c = sampling frequency (int)
|
||||
d = mode (string)
|
||||
e = mode extension (int)
|
||||
f = framesize (int)
|
||||
g = stereo (int)
|
||||
h = copyright (int)
|
||||
i = error protection (int)
|
||||
j = emphasis (int)
|
||||
k = bitrate (int)
|
||||
l = extension (int)
|
||||
|
||||
@F <a> <b> <c> <d>
|
||||
Status message during playing (frame info)
|
||||
a = framecount (int)
|
||||
b = frames left this song (int)
|
||||
c = seconds (float)
|
||||
d = seconds left (float)
|
||||
|
||||
@P <a>
|
||||
Playing status
|
||||
a = 0: playing stopped
|
||||
a = 1: playing paused
|
||||
a = 2: playing unpaused
|
||||
|
||||
@E <a>
|
||||
An error occured
|
||||
Errors may be also reported by mpg123 through
|
||||
stderr (without @E)
|
||||
a = error message (string)
|
||||
|
||||
@J <n>
|
||||
Jumped to frame n.
|
||||
|
||||
@RVA <mode>
|
||||
Switched to specified RVA mode.
|
||||
|
||||
@V <volume>%
|
||||
Set volume to specified value (float, percent).
|
||||
|
||||
@<x> : <y> : <z>
|
||||
Set equalizer value z for band y of channel x.
|
||||
|
||||
@bass: <b> mid: <m> treble: <t>
|
||||
Set simple equalizer control for bass, mid, treble.
|
||||
|
||||
@T <response from TAG command>
|
||||
The output is multiple lines, begin marked by "@T {", end by "@T }".
|
||||
ID3v1 data is like in the @I info lines, just with "@T" in front.
|
||||
An ID3v2 data field is introduced via ([ ... ] means optional):
|
||||
@T ID3v2.<NAME>[ [lang(<LANG>)] desc(<description>)]:
|
||||
The lines of data follow with "=" prefixed:
|
||||
@T =<one line of content in UTF-8 encoding>
|
||||
|
||||
|
||||
EQUALIZER CONTROL (History)
|
||||
---------------------------
|
||||
|
||||
WARNING: The interpretation of the command arguments changed. The channel is either 1 or 2 or 3 (left, right, both).
|
||||
It used to be 0 or 1 for left or right but the change slipped through during libmpg123 work and now it is a fact.
|
||||
Sorry.
|
||||
|
||||
Cold Feet Audio Patch for MPG123
|
||||
|
||||
10.07.2002
|
||||
|
||||
This is a dirty little hack to enable the equalizer in mpg123's
|
||||
generic_control interface. It works like this, there are two
|
||||
different channels on the equalizer and 32 frequencys.
|
||||
|
||||
The hack just enables mpg123's built in equalizer to run real-time.
|
||||
We haven't built in any capability to save the eq, you're frontend
|
||||
will have to handle that part, and init the eq on the startup of
|
||||
mpg123.
|
||||
|
||||
K, it works like this:
|
||||
|
||||
#./mpg123 -R - <---- This command will start mpg123 in 'frontend' mode.
|
||||
|
||||
If you want to send it some eq values you'd send it:
|
||||
eq X Y V[ENTER]
|
||||
|
||||
X = The channel. It can be either 0 or 1. I haven't put any error checking
|
||||
in, so it probably wouldn't be a good idea to go out of bounds. (integer)
|
||||
Y = This is the frequency, it can be 0 to 31. 0 being closer to treble and
|
||||
31 being closer to bass. (integer)
|
||||
V = The raw value of your equalizer setting. I've found that the values work
|
||||
best between 0.00 and 3.00. When mpg123 starts up, all of them are set
|
||||
to 1.00.
|
||||
|
||||
OK, have fun! If you have any questions or found some bugs, please contact
|
||||
nutcase@dtmf.org
|
||||
|
||||
Thanks,
|
||||
nut
|
||||
|
||||
Note by Thomas Orgis: The contact appears to be dead.
|
270
node_modules/lame/deps/mpg123/doc/ROAD_TO_LGPL
generated
vendored
Normal file
270
node_modules/lame/deps/mpg123/doc/ROAD_TO_LGPL
generated
vendored
Normal file
@ -0,0 +1,270 @@
|
||||
The License of mpg123
|
||||
=====================
|
||||
|
||||
by Thomas Orgis <thomas@orgis.org>
|
||||
|
||||
1. Story: The Odyssey, The Decision
|
||||
-----------------------------------
|
||||
|
||||
This is the 17th of July in the year 2006, after half a year of preparation and the contributor email campaign running for over 3 months, I'm going to draw a conclusion about the licensing of the mpg123 project.
|
||||
|
||||
|
||||
The license conditions of mpg123 have been subject to dispute and rejection by parts of the free software world in the past...
|
||||
We want to have it straight now.
|
||||
Michael doesn't have much freetime to maintain the code and bother with requests by companies wanting to use mpglib.
|
||||
So, he already decided to place mpglib under LGPL and mpg123 under GPL in the past.
|
||||
Now, after I applied for taking over maintainership we decided on placing as much code of the whole project as possible under LGPL to ease future code migration and merging between mpg123 and mpglib.
|
||||
|
||||
That decision was followed by a lot of work to track down as many contributors to both Michael's development tree and my -thor one as possible to ask them for explicit LGPL support statements.
|
||||
I wrote to every Name/eMail address I could track down (including internet search for new addresses), regardless of the question if there indeed is some code left by that person.
|
||||
I asked them to utter any problem they may have with LGPL license as well as contacting me if there are _no_ issues.
|
||||
|
||||
Of course, without having to ask again, supporters of LGPL are the initial author and the two current maintainers:
|
||||
|
||||
Michael Hipp
|
||||
Nicholas J. Humfrey
|
||||
Thomas Orgis
|
||||
|
||||
Also, new stuff was included with explicit LGPL permission from
|
||||
|
||||
Adrian Bacon
|
||||
Romain Dolbeau
|
||||
Guillaume Outters
|
||||
|
||||
Plus there is stuff pending with permission from
|
||||
|
||||
Zuxy Meng
|
||||
|
||||
Now for the folks having made suggestions and contributions over the years...
|
||||
In the first round starting in March 2006 I wrote the initial mail to anyone I could get. That resulted in some positive responses - examples:
|
||||
|
||||
"I don't remember what I did, but LGPL is fine by me."
|
||||
|
||||
"No problem for me."
|
||||
|
||||
"Any code I may have contributed to the mpg123 project at any time in the
|
||||
past are hereby licensed to you under the GNU Lesser General Public"
|
||||
|
||||
"it's fine with me if mpg123 goes LGPL.
|
||||
However, my contribution to mpg123 was very minor, and I'm not even sure if
|
||||
any of my code is still in the current version."
|
||||
|
||||
A good number of eMail addresses is just broken (years have passed...) and another good number of addresses are either totally unknown or not known to be good or bad since no response (not even bounce - thanks, spam!) came back in over 3 months.
|
||||
|
||||
Some statistics for the first run: 86 total , 15 positive, 37 broken email, 34 unknown
|
||||
|
||||
Positive:
|
||||
Andreas Neuhaus
|
||||
Chris Butler
|
||||
Colin Watson
|
||||
Daniel Kobras
|
||||
Daniel O'Connor
|
||||
Daniel Skarda
|
||||
Erik B. Andersen
|
||||
Helge Deller
|
||||
Juergen Schoew
|
||||
Martin Denn
|
||||
Munechika SUMIKAWA
|
||||
Oliver Fromme
|
||||
Petr Stehlik
|
||||
Robert Bihlmeyer
|
||||
Samuel Audet
|
||||
Shane Wegner
|
||||
Stefan Bieschewski
|
||||
Steven Schultz
|
||||
Tillmann Steinbrecher
|
||||
Tomas Oegren
|
||||
Tommi Virtanen
|
||||
|
||||
Then, an investigation of the code revealed a core of people having actually left traces in the code.
|
||||
Some more effort was put in tracking them down, with the partial success of having found some new, working email addresses and thus having some more positive responses .
|
||||
But also, it showed that the main number of people is not reachable anymore.
|
||||
|
||||
Creators (of a whole file, driver...): 16 total, 5 positive, 2 broken email, 9 unknown
|
||||
|
||||
Positive:
|
||||
Andreas Neuhaus
|
||||
Juergen Schoew
|
||||
Oliver Fromme
|
||||
Petr Stehlik
|
||||
Samuel Audet
|
||||
|
||||
Modders: 7 total, 1 positive, 2 broken mail, 4 unknown
|
||||
|
||||
Positive:
|
||||
Tomas Oegren
|
||||
|
||||
|
||||
That shows two things:
|
||||
|
||||
1. It's impossible to get a response from everyone having contributed in some way.
|
||||
2. Everyone who I reached supports the license change to LGPL
|
||||
|
||||
|
||||
So, for the sake of getting a reasonable step forward, I'm going to close the case.
|
||||
There are three categories of code:
|
||||
|
||||
1. written by Michael or some other contributor who explicitly supports LGPL
|
||||
|
||||
Clear case: LGPL
|
||||
|
||||
2. contributed years ago without license notice
|
||||
|
||||
The grounded assumption of can be made that the contributor accepted Michael's conditions, esp. the part about the software being available without cost.
|
||||
Furthermore they gave the code into Michael's hands or placed patches in the internet without any claims concerning commercial uses - wich were not covered by the old COPYING file.
|
||||
Based on the assumption of acceptance for the mpg123 COPYING file and the included rule of Michael's decision for any further use, this code is to be placed under LGPL by Michael's decision.
|
||||
|
||||
3. contributed with notice
|
||||
|
||||
Some code includes a note about it being GPL. Well, one has to respect that.
|
||||
|
||||
|
||||
That results in the bulk of mpg123 being LGPL and possibly some parts GPL only.
|
||||
|
||||
|
||||
2. The Inventory
|
||||
----------------
|
||||
|
||||
I will now examine the files of the mpg123 svn trunk as of 17.07.2006 with their respective legal status:
|
||||
|
||||
Stuff added by current maintainers, thus being LGPL:
|
||||
|
||||
scripts/debugdef.pl
|
||||
AUTHORS
|
||||
autogen.sh
|
||||
configure.ac
|
||||
Makefile.am
|
||||
MakeLegacy.sh
|
||||
src/audio_jack.c
|
||||
src/audio_libao.c
|
||||
src/Makefile.am
|
||||
src/audio_alsa09.c
|
||||
src/config.h.legacy
|
||||
src/debug.h
|
||||
src/layer3.h
|
||||
|
||||
Non-Code files from Michael, maintainers or just trivial content (safely LGPL, then):
|
||||
|
||||
BENCHMARKING
|
||||
BUGS
|
||||
CHANGES
|
||||
equalize.dat
|
||||
INSTALL
|
||||
mpg123.1
|
||||
COPYING
|
||||
TODO
|
||||
README
|
||||
README.3DNOW
|
||||
README.cfa
|
||||
README.new
|
||||
README.remote
|
||||
README.thor
|
||||
README.WIN32
|
||||
test.pl
|
||||
BENCHMARKING.thor
|
||||
CONTACT
|
||||
|
||||
sources under LGPLv2.1:
|
||||
|
||||
by Michael:
|
||||
|
||||
audio.c
|
||||
audio_dummy.c
|
||||
audio.h
|
||||
audio_hp.c
|
||||
audio_oss.c
|
||||
audio_sun.c
|
||||
common.c
|
||||
common.h
|
||||
dct64.c
|
||||
dct64_i386.c
|
||||
decode_2to1.c
|
||||
decode_4to1.c
|
||||
decode.c
|
||||
decode_i386.c
|
||||
decode_ntom.c
|
||||
Makefile.legacy
|
||||
equalizer.c
|
||||
getbits.c
|
||||
getbits.h
|
||||
huffman.h
|
||||
l2tables.h
|
||||
layer1.c
|
||||
layer2.c
|
||||
layer3.c
|
||||
mpg123.c
|
||||
mpg123.h
|
||||
readers.c
|
||||
system.c
|
||||
tabinit.c
|
||||
term.c
|
||||
term.h
|
||||
|
||||
by contributors:
|
||||
|
||||
audio_aix.c: Juergen Schoew, Tomas Oegren, Niklas Edmundsson
|
||||
audio_alib.c: Erwan Ducroquet
|
||||
audio_esd.c: Eric B. Mitchell
|
||||
audio_macosx.c: Guillaume Outters
|
||||
audio_mint.c: Petr Stehlik
|
||||
audio_nas.c: Martin Denn
|
||||
audio_os2.c: Samuel Audet
|
||||
audio_sgi.c: Thomas Woerner
|
||||
audio_win32.c: Tony Million
|
||||
buffer.c: Oliver Fromme
|
||||
buffer.h: Daniel Kobras / Oliver Fromme
|
||||
control_generic.c: Andreas Neuhaus, Michael Hipp, Thomas Orgis
|
||||
dct36_3dnow.s: Syuuhei Kashiyama
|
||||
dct64_3dnow.s: Syuuhei Kashiyama
|
||||
dct64_altivec.c: Romain Dolbeau
|
||||
dct64_i486.c: Fabrice Bellard
|
||||
decode_3dnow.s: Syuuhei Kashiyama
|
||||
decode_i486.c: Fabrice Bellard
|
||||
decode_i586_dither.s: Stefan Bieschewski, Adrian Bacon
|
||||
decode_i586.s: Stefan Bieschewski
|
||||
decode_MMX.s: higway
|
||||
dct64_MMX.s: higway
|
||||
tabinit_MMX.s: higway
|
||||
equalizer_3dnow.s: KIMURA Takuhiro
|
||||
genre.h: Shane Wegner
|
||||
getcpuflags.s: KIMURA Takuhiro
|
||||
getlopt.c: Oliver Fromme
|
||||
getlopt.h: Oliver Fromme
|
||||
httpget.c: Oliver Fromme
|
||||
wav.c: Samuel Audet
|
||||
xfermem.c: Oliver Fromme
|
||||
xfermem.h: Oliver Fromme
|
||||
Makefile.win32: Michael Hipp / Tony Million
|
||||
|
||||
GPLv2
|
||||
|
||||
audio_alsa.c: by Anders Semb Hermansen, Jaroslav Kysela, Ville Syrjala
|
||||
|
||||
|
||||
To be removed from distribution and thus not licensed in any special way:
|
||||
|
||||
precompiled/
|
||||
tools/
|
||||
|
||||
The mpglib source is not part of the core mpg123 distribution anymore - it's written by Michael, it's LGPL, it shall become a real library with own distribution and be married to mpg123 again.
|
||||
|
||||
|
||||
3. Conclusion
|
||||
-------------
|
||||
|
||||
The decoder core Michael's work and under LGPL without question.
|
||||
Oliver Fromme is more of a co-author than "just" a project contributor, but he explicitly agreed to LGPL anyway.
|
||||
So, the core functionality is really safe without doubt.
|
||||
|
||||
Contributors added mainly output drivers (perhaps coming from some freely available reference implementation) and CPU optimizations.
|
||||
Having explicit permission from a good deal of major contributors, the LGPL is quite comfortable here, too.
|
||||
I won't hide that there are explicit statements missing for MMX and 3DNow! optimizations (and the i486 opt, for that matter) due to unreachable authors.
|
||||
But I feel safe to make it LGPL there, too, because of the argument of them having given the code to Michael to incorporate it into mpg123 - without any own terms, implying that they agree to Michael's terms.
|
||||
|
||||
There is one file left that carries an explicit GPL (_no_ LGPL) statement: the old alsa output. This file won't work on current Linux systems, anyway.
|
||||
Alsa is available through libao. There will probably be a new alsa output.
|
||||
So, even that one GPL exception may vanish in future, but I'll keep it for now as there may be someone who still has an alsa installation for that it works.
|
||||
|
||||
For now that means mpg123 is LGPL with the exception of one file that is GPL only.
|
||||
|
||||
End.
|
13
node_modules/lame/deps/mpg123/doc/THANKS
generated
vendored
Normal file
13
node_modules/lame/deps/mpg123/doc/THANKS
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
There are authors who write code and there are people who point us to what code to write, show us our errors and generally are trying hard to compensate the time the developers spent coding and not actually using the software.
|
||||
These people are very valuable, indeed - let's thank our
|
||||
|
||||
Testers (alphapetical):
|
||||
|
||||
- Gabor Z. Papp
|
||||
- "Gates Fan"
|
||||
- JonY
|
||||
- Serge Simon and the R.O.M. 106.5 FM Team (http://www.rom.lu/)
|
||||
who motivated the --loop and --timeout modes and furthermore supported the maintainer with a donation on sf.net and a real bottle of wine from Luxembourg!
|
||||
- Willy Tarreau
|
||||
|
||||
Heck, let's thank all of you who contributed bug reports, suggestions... those who took mpg123 source and compiled it on uncommon platforms.
|
63
node_modules/lame/deps/mpg123/doc/TODO
generated
vendored
Normal file
63
node_modules/lame/deps/mpg123/doc/TODO
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
We badly need:
|
||||
- header reorganization (lots of stuff don't belong to mpg123.h)
|
||||
- integer type safety - STOP using ints where size_t or at least long would be appropriate (expecially stream readers)
|
||||
- sprintf -> snprintf (maybe with switch to support ancient libc; or replacement by us)
|
||||
- rewrite httpget.c; that thing has been a can of bugs for years and I understand why when I look at it (way too many cooks)
|
||||
- really parse ID3V2 tags instead of skipping; done for RVA values... using the string info (just?) needs some Unicode/Locale handling
|
||||
- check support for fixed point arithmentic; generic_nofpu seems wo work generally, but resampling does not sound nice
|
||||
|
||||
From Nicholas:
|
||||
- Seperate out MPEG Audio decoder (only) into seperate library
|
||||
- Allow choice of audio output at runtime, rather than compile time
|
||||
- Choose processor optimization at runtime, rather than compile time?
|
||||
|
||||
From Michael (some time after/around pre-0.59s):
|
||||
|
||||
- add CRC check.
|
||||
- add 'free format stream' support.
|
||||
- optimize layer2.c:
|
||||
step_two: fraction as pointer ..
|
||||
process first channel 0 than channel 1
|
||||
copy channel 0 to channel 1 for: i >= jsbound
|
||||
- better frame reader .. especially for layer 3 - DONE by a good deal by Thomas
|
||||
- MPEG system stream decoder
|
||||
- check again layer1 !! (Layer-1 support not heavily tested ..)
|
||||
Problems with Layer1 fl7 reference stream
|
||||
- Write a special (optimized) 'single channel' decode.
|
||||
- optimized dct64 for down sampling modes
|
||||
- native audio support for AIX and DEC
|
||||
- update manpage
|
||||
- optimizations for downsampling modes on layer2 and layer1
|
||||
|
||||
MORE TODO: (partially done)
|
||||
---------------------------
|
||||
|
||||
A few notes on how mpg123 tries to select a 'good'
|
||||
audio encoding and frequency. (not full implemented yet!!)
|
||||
|
||||
- mpg123 tries to set the settings you specify on the command line
|
||||
in the order of its appearence (exclusiv .. no fallback then)
|
||||
(-r <rate>, --mono, --stereo, --8bit, etc )
|
||||
|
||||
- after this, mpg123 tries to set
|
||||
1. the number of channels (or fallback to mono if stereo isn't possible)
|
||||
2. the audioformat to 16 bit (or fallback to 8bit)
|
||||
3. the "best" frequency: (in this order)
|
||||
- the exact stream frequency or fallback to
|
||||
- 2:1 frequency or fallback to
|
||||
- 4:1 frequency or try the
|
||||
- nearest frequency lower than the frequency of your stream
|
||||
mpg123 automagically converts the rate.
|
||||
|
||||
So, if you think (or even know), that your hardware supports a higher
|
||||
frequency only with eg. mono,8bit you must force mpg123 to play mono
|
||||
and 8bit. ("--8bit -m") etc....
|
||||
|
||||
If you wanna a constant format eg to output the data to stdout you
|
||||
must explicit force it with eg: '-r 44100 --stereo'
|
||||
Else the format will be the format of the mpeg stream.
|
||||
|
||||
|
||||
|
||||
|
||||
|
21
node_modules/lame/deps/mpg123/doc/doxy_examples.c
generated
vendored
Normal file
21
node_modules/lame/deps/mpg123/doc/doxy_examples.c
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/** \defgroup mpg123_examples example programs using libmpg123
|
||||
@{ */
|
||||
|
||||
/** \file mpg123_to_wav.c A simple MPEG audio to WAV converter using libmpg123 (read) and libsndfile (write).
|
||||
...an excersize on two simple APIs. */
|
||||
|
||||
/** \file mpglib.c Example program mimicking the old mpglib test program.
|
||||
It takes an MPEG bitstream from standard input and writes raw audio to standard output.
|
||||
This is an use case of the mpg123_decode() in and out function in the feeder mode, quite close to classic mpglib usage and thus a template to convert from that to libmpg123.
|
||||
*/
|
||||
|
||||
/** \file scan.c Example program that examines the exact length of an MPEG file.
|
||||
It opens a list of files and does mpg123_scan() on each and reporting the mpg123_length() before and after that. */
|
||||
|
||||
/** \file id3dump.c Parse ID3 info and print to standard output. */
|
||||
|
||||
/** \file extract_frames.c Parse stream and extract only the valid MPEG frames to standard output. */
|
||||
|
||||
/** \file feedseek.c Fuzzy feeder seeking. */
|
||||
|
||||
/* @} */
|
41
node_modules/lame/deps/mpg123/doc/doxygen.conf
generated
vendored
Normal file
41
node_modules/lame/deps/mpg123/doc/doxygen.conf
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
#
|
||||
|
||||
PROJECT_NAME = "libmpg123"
|
||||
OUTPUT_DIRECTORY = .
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
INPUT = doxy_examples.c examples/mpg123_to_wav.c examples/mpglib.c examples/scan.c examples/feedseek.c examples/id3dump.c ../src/libmpg123/mpg123.h
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
EXTRACT_ALL = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
SOURCE_BROWSER = YES
|
||||
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
DISABLE_INDEX = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
ENUM_VALUES_PER_LINE = 2
|
||||
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = YES
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
PREDEFINED = EXPORT=
|
||||
|
||||
GENERATE_HTML = YES
|
||||
GENERATE_LATEX = NO
|
||||
GENERATE_RTF = NO
|
||||
GENERATE_MAN = YES
|
||||
MAN_LINKS = YES
|
||||
GENERATE_XML = NO
|
||||
|
||||
HTML_HEADER = doxyhead.xhtml
|
||||
HTML_FILE_EXTENSION = .shtml
|
12
node_modules/lame/deps/mpg123/doc/doxyhead.xhtml
generated
vendored
Normal file
12
node_modules/lame/deps/mpg123/doc/doxyhead.xhtml
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<!--#include virtual="../header.html" -->
|
||||
<title>$title</title>
|
||||
<link href="/doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<!--#include virtual="../linkbar.html" -->
|
||||
<div style="padding:1em;">
|
||||
<strong>Note:</strong>
|
||||
This API doc is automatically generated from the current development version that you can get via Subversion or as a daily snapshot from <a href="http://mpg123.org/snapshot">http://mpg123.org/snapshot</a>.
|
||||
There may be differences (additions) compared to the latest stable release. See <a href="http://mpg123.org/cgi-bin/viewvc.cgi/trunk/NEWS.libmpg123?view=markup">NEWS.libmpg123</a> and the overall <a href="http://mpg123.org/cgi-bin/viewvc.cgi/trunk/NEWS?view=markup">NEWS</a> file on libmpg123 versions and important changes between them.<br />
|
||||
Let me emphasize that the policy for libmpg123 is to always stay backwards compatible -- only <em>additions</em> are planned (and it's not yet planned to change the plans;-).
|
||||
</div>
|
48
node_modules/lame/deps/mpg123/doc/examples/Makefile
generated
vendored
Normal file
48
node_modules/lame/deps/mpg123/doc/examples/Makefile
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
targets = feedseek mpg123_to_wav mpg123_to_wav_replaced_io scan id3dump mpglib dump_seekindex extract_frames
|
||||
|
||||
all: $(targets)
|
||||
|
||||
# On largefile-aware systems you might want to use these instead:
|
||||
#MPG123_CFLAGS := $(shell pkg-config --cflags libmpg123_64)
|
||||
#MPG123_LDFLAGS := $(shell pkg-config --libs libmpg123_64)
|
||||
# This works on sane setups where off_t is off_t, and just that.
|
||||
ifeq ($(MPG123_PREFIX),)
|
||||
MPG123_CFLAGS := $(shell pkg-config --cflags libmpg123)
|
||||
MPG123_LDFLAGS := $(shell pkg-config --libs libmpg123)
|
||||
else # Yeah, that's with GNU/Linux in mind, at least GNU ld ...
|
||||
MPG123_CFLAGS := -I$(MPG123_PREFIX)/include
|
||||
MPG123_LDFLAGS := -L$(MPG123_PREFIX)/lib -Wl,-rpath $(MPG123_PREFIX)/lib -lmpg123
|
||||
endif
|
||||
SND_CFLAGS := $(shell pkg-config --cflags sndfile)
|
||||
SND_LDFLAGS := $(shell pkg-config --libs sndfile)
|
||||
|
||||
# Oder of libs not that important here...
|
||||
compile = $(CC) $(CPPFLAGS) $(CFLAGS) $(MPG123_CFLAGS)
|
||||
linkflags = $(MPG123_LDFLAGS) $(LDFLAGS)
|
||||
|
||||
mpg123_to_wav: mpg123_to_wav.c
|
||||
$(compile) -o mpg123_to_wav mpg123_to_wav.c $(SND_CFLAGS) $(SND_LDFLAGS) $(linkflags)
|
||||
|
||||
mpg123_to_wav_replaced_io: mpg123_to_wav_replaced_io.c
|
||||
$(compile) -o $@ $< $(SND_CFLAGS) $(SND_LDFLAGS) $(linkflags)
|
||||
|
||||
feedseek: feedseek.c
|
||||
$(compile) -o feedseek feedseek.c $(linkflags)
|
||||
|
||||
scan: scan.c
|
||||
$(compile) -o scan scan.c $(linkflags)
|
||||
|
||||
id3dump:id3dump.c
|
||||
$(compile) -o id3dump id3dump.c $(linkflags)
|
||||
|
||||
dump_seekindex: dump_seekindex.c
|
||||
$(compile) -o dump_seekindex dump_seekindex.c $(linkflags)
|
||||
|
||||
mpglib: mpglib.c
|
||||
$(compile) -o mpglib mpglib.c $(linkflags)
|
||||
|
||||
extract_frames: extract_frames.c
|
||||
$(compile) -o $@ $< $(linkflags)
|
||||
|
||||
clean:
|
||||
rm -vf $(targets)
|
41
node_modules/lame/deps/mpg123/doc/examples/dump_seekindex.c
generated
vendored
Normal file
41
node_modules/lame/deps/mpg123/doc/examples/dump_seekindex.c
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
dump_seekindex: Scan a mpeg file and dump its seek index.
|
||||
|
||||
copyright 2010 by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
initially written by Patrick Dehne
|
||||
*/
|
||||
|
||||
#include <mpg123.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
mpg123_handle *m;
|
||||
off_t* offsets;
|
||||
off_t step;
|
||||
size_t fill, i;
|
||||
|
||||
if(argc != 2)
|
||||
{
|
||||
fprintf(stderr, "\nI will dump the frame index of an MPEG audio file.\n");
|
||||
fprintf(stderr, "\nUsage: %s <mpeg audio file>\n\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
mpg123_init();
|
||||
m = mpg123_new(NULL, NULL);
|
||||
mpg123_param(m, MPG123_RESYNC_LIMIT, -1, 0);
|
||||
mpg123_param(m, MPG123_INDEX_SIZE, -1, 0);
|
||||
mpg123_open(m, argv[1]);
|
||||
mpg123_scan(m);
|
||||
|
||||
mpg123_index(m, &offsets, &step, &fill);
|
||||
for(i=0; i<fill;i++) {
|
||||
printf("Frame number %d: file offset %d\n", i * step, offsets[i]);
|
||||
}
|
||||
|
||||
mpg123_close(m);
|
||||
mpg123_delete(m);
|
||||
mpg123_exit();
|
||||
return 0;
|
||||
}
|
92
node_modules/lame/deps/mpg123/doc/examples/extract_frames.c
generated
vendored
Normal file
92
node_modules/lame/deps/mpg123/doc/examples/extract_frames.c
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
extract_frams: utlize the framebyframe API and mpg123_framedata to extract the MPEG frames out of a stream (strip off anything else).
|
||||
|
||||
copyright 2011 by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
initially written by Thomas Orgis
|
||||
*/
|
||||
|
||||
#include <mpg123.h>
|
||||
|
||||
/* unistd.h is not available under MSVC,
|
||||
io.h defines the read and write functions */
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int do_work(mpg123_handle *m);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret = 0;
|
||||
mpg123_handle *m;
|
||||
|
||||
mpg123_init();
|
||||
m = mpg123_new(NULL, &ret);
|
||||
|
||||
if(m == NULL)
|
||||
{
|
||||
fprintf(stderr, "Cannot create handle: %s", mpg123_plain_strerror(ret));
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "I'll take your dirty MPEG audio from standard input and will write the extrated pure MPEG data to stadard output.\n");
|
||||
if(argc > 1 && strcmp(argv[1], "--noinfo") == 0)
|
||||
{
|
||||
fprintf(stderr, "Enabling parsing/consuming of the Info frame so that it will not appear in output.\n");
|
||||
ret = mpg123_param(m, MPG123_REMOVE_FLAGS, MPG123_IGNORE_INFOFRAME, 0.);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "If you'd have given --noinfo as argument, I would omit a LAME/Xing info frame.\n");
|
||||
ret = mpg123_param(m, MPG123_ADD_FLAGS, MPG123_IGNORE_INFOFRAME, 0.);
|
||||
}
|
||||
if(ret == 0) ret = do_work(m);
|
||||
|
||||
if(ret != 0) fprintf(stderr, "Some error occured: %s\n", mpg123_strerror(m));
|
||||
|
||||
|
||||
mpg123_delete(m); /* Closes, too. */
|
||||
}
|
||||
mpg123_exit();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int do_work(mpg123_handle *m)
|
||||
{
|
||||
int ret;
|
||||
size_t count = 0;
|
||||
ret = mpg123_open_fd(m, STDIN_FILENO);
|
||||
if(ret != MPG123_OK) return ret;
|
||||
|
||||
while( (ret = mpg123_framebyframe_next(m)) == MPG123_OK || ret == MPG123_NEW_FORMAT )
|
||||
{
|
||||
unsigned long header;
|
||||
unsigned char *bodydata;
|
||||
size_t bodybytes;
|
||||
if(mpg123_framedata(m, &header, &bodydata, &bodybytes) == MPG123_OK)
|
||||
{
|
||||
/* Need to extract the 4 header bytes from the native storage in the correct order. */
|
||||
unsigned char hbuf[4];
|
||||
int i;
|
||||
for(i=0; i<4; ++i) hbuf[i] = (unsigned char) ((header >> ((3-i)*8)) & 0xff);
|
||||
|
||||
/* Now write out both header and data, fire and forget. */
|
||||
write(STDOUT_FILENO, hbuf, 4);
|
||||
write(STDOUT_FILENO, bodydata, bodybytes);
|
||||
fprintf(stderr, "%zu: header 0x%08x, %zu body bytes\n", ++count, header, bodybytes);
|
||||
}
|
||||
}
|
||||
|
||||
if(ret != MPG123_DONE)
|
||||
fprintf(stderr, "Some error occured (non-fatal?): %s\n", mpg123_strerror(m));
|
||||
|
||||
fprintf(stderr, "Done with %zu MPEG frames.\n", count);
|
||||
|
||||
return 0;
|
||||
}
|
238
node_modules/lame/deps/mpg123/doc/examples/feedseek.c
generated
vendored
Normal file
238
node_modules/lame/deps/mpg123/doc/examples/feedseek.c
generated
vendored
Normal file
@ -0,0 +1,238 @@
|
||||
/*
|
||||
feedseek: test program for libmpg123, showing how to use fuzzy seeking in feeder mode
|
||||
copyright 2008 by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
*/
|
||||
|
||||
#include <mpg123.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define INBUFF 16384 * 2 * 2
|
||||
#define WAVE_FORMAT_PCM 0x0001
|
||||
#define WAVE_FORMAT_IEEE_FLOAT 0x0003
|
||||
|
||||
FILE *out;
|
||||
size_t totaloffset, dataoffset;
|
||||
long rate;
|
||||
int channels, enc;
|
||||
unsigned short bitspersample, wavformat;
|
||||
|
||||
// write wav header
|
||||
void initwav()
|
||||
{
|
||||
unsigned int tmp32 = 0;
|
||||
unsigned short tmp16 = 0;
|
||||
|
||||
fwrite("RIFF", 1, 4, out);
|
||||
totaloffset = ftell(out);
|
||||
|
||||
fwrite(&tmp32, 1, 4, out); // total size
|
||||
fwrite("WAVE", 1, 4, out);
|
||||
fwrite("fmt ", 1, 4, out);
|
||||
tmp32 = 16;
|
||||
fwrite(&tmp32, 1, 4, out); // format length
|
||||
tmp16 = wavformat;
|
||||
fwrite(&tmp16, 1, 2, out); // format
|
||||
tmp16 = channels;
|
||||
fwrite(&tmp16, 1, 2, out); // channels
|
||||
tmp32 = rate;
|
||||
fwrite(&tmp32, 1, 4, out); // sample rate
|
||||
tmp32 = rate * bitspersample/8 * channels;
|
||||
fwrite(&tmp32, 1, 4, out); // bytes / second
|
||||
tmp16 = bitspersample/8 * channels; // float 16 or signed int 16
|
||||
fwrite(&tmp16, 1, 2, out); // block align
|
||||
tmp16 = bitspersample;
|
||||
fwrite(&tmp16, 1, 2, out); // bits per sample
|
||||
fwrite("data ", 1, 4, out);
|
||||
tmp32 = 0;
|
||||
dataoffset = ftell(out);
|
||||
fwrite(&tmp32, 1, 4, out); // data length
|
||||
}
|
||||
|
||||
// rewrite wav header with final length infos
|
||||
void closewav()
|
||||
{
|
||||
unsigned int tmp32 = 0;
|
||||
unsigned short tmp16 = 0;
|
||||
|
||||
long total = ftell(out);
|
||||
fseek(out, totaloffset, SEEK_SET);
|
||||
tmp32 = total - (totaloffset + 4);
|
||||
fwrite(&tmp32, 1, 4, out);
|
||||
fseek(out, dataoffset, SEEK_SET);
|
||||
tmp32 = total - (dataoffset + 4);
|
||||
|
||||
fwrite(&tmp32, 1, 4, out);
|
||||
}
|
||||
|
||||
// determine correct wav format and bits per sample
|
||||
// from mpg123 enc value
|
||||
void initwavformat()
|
||||
{
|
||||
if(enc & MPG123_ENC_FLOAT_64)
|
||||
{
|
||||
bitspersample = 64;
|
||||
wavformat = WAVE_FORMAT_IEEE_FLOAT;
|
||||
}
|
||||
else if(enc & MPG123_ENC_FLOAT_32)
|
||||
{
|
||||
bitspersample = 32;
|
||||
wavformat = WAVE_FORMAT_IEEE_FLOAT;
|
||||
}
|
||||
else if(enc & MPG123_ENC_16)
|
||||
{
|
||||
bitspersample = 16;
|
||||
wavformat = WAVE_FORMAT_PCM;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitspersample = 8;
|
||||
wavformat = WAVE_FORMAT_PCM;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
unsigned char buf[INBUFF];
|
||||
unsigned char *audio;
|
||||
FILE *in;
|
||||
mpg123_handle *m;
|
||||
int ret, state;
|
||||
size_t inc, outc;
|
||||
off_t len, num;
|
||||
size_t bytes;
|
||||
off_t inoffset;
|
||||
inc = outc = 0;
|
||||
|
||||
if(argc < 3)
|
||||
{
|
||||
fprintf(stderr,"Please supply in and out filenames\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mpg123_init();
|
||||
|
||||
m = mpg123_new(NULL, &ret);
|
||||
if(m == NULL)
|
||||
{
|
||||
fprintf(stderr,"Unable to create mpg123 handle: %s\n", mpg123_plain_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
mpg123_param(m, MPG123_VERBOSE, 2, 0);
|
||||
|
||||
ret = mpg123_param(m, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS, 0);
|
||||
if(ret != MPG123_OK)
|
||||
{
|
||||
fprintf(stderr,"Unable to set library options: %s\n", mpg123_plain_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Let the seek index auto-grow and contain an entry for every frame
|
||||
ret = mpg123_param(m, MPG123_INDEX_SIZE, -1, 0);
|
||||
if(ret != MPG123_OK)
|
||||
{
|
||||
fprintf(stderr,"Unable to set index size: %s\n", mpg123_plain_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = mpg123_format_none(m);
|
||||
if(ret != MPG123_OK)
|
||||
{
|
||||
fprintf(stderr,"Unable to disable all output formats: %s\n", mpg123_plain_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Use float output
|
||||
ret = mpg123_format(m, 44100, MPG123_MONO | MPG123_STEREO, MPG123_ENC_FLOAT_32);
|
||||
if(ret != MPG123_OK)
|
||||
{
|
||||
fprintf(stderr,"Unable to set float output formats: %s\n", mpg123_plain_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = mpg123_open_feed(m);
|
||||
if(ret != MPG123_OK)
|
||||
{
|
||||
fprintf(stderr,"Unable open feed: %s\n", mpg123_plain_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
|
||||
in = fopen(argv[1], "rb");
|
||||
if(in == NULL)
|
||||
{
|
||||
fprintf(stderr,"Unable to open input file %s\n", argv[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
out = fopen(argv[2], "wb");
|
||||
if(out == NULL)
|
||||
{
|
||||
fclose(in);
|
||||
fprintf(stderr,"Unable to open output file %s\n", argv[2]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Seeking...\n");
|
||||
/* That condition is tricky... parentheses are crucial... */
|
||||
while((ret = mpg123_feedseek(m, 95000, SEEK_SET, &inoffset)) == MPG123_NEED_MORE)
|
||||
{
|
||||
len = fread(buf, sizeof(unsigned char), INBUFF, in);
|
||||
if(len <= 0)
|
||||
break;
|
||||
inc += len;
|
||||
|
||||
state = mpg123_feed(m, buf, len);
|
||||
if(state == MPG123_ERR)
|
||||
{
|
||||
fprintf(stderr, "Error: %s", mpg123_strerror(m));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if(ret == MPG123_ERR)
|
||||
{
|
||||
fprintf(stderr, "Feedseek failed: %s\n", mpg123_strerror(m));
|
||||
return -1;
|
||||
}
|
||||
|
||||
fseek(in, inoffset, SEEK_SET);
|
||||
|
||||
fprintf(stderr, "Starting decode...\n");
|
||||
while(1)
|
||||
{
|
||||
len = fread(buf, sizeof(unsigned char), INBUFF, in);
|
||||
if(len <= 0)
|
||||
break;
|
||||
inc += len;
|
||||
ret = mpg123_feed(m, buf, len);
|
||||
|
||||
while(ret != MPG123_ERR && ret != MPG123_NEED_MORE)
|
||||
{
|
||||
ret = mpg123_decode_frame(m, &num, &audio, &bytes);
|
||||
if(ret == MPG123_NEW_FORMAT)
|
||||
{
|
||||
mpg123_getformat(m, &rate, &channels, &enc);
|
||||
initwavformat();
|
||||
initwav();
|
||||
fprintf(stderr, "New format: %li Hz, %i channels, encoding value %i\n", rate, channels, enc);
|
||||
}
|
||||
fwrite(audio, sizeof(unsigned char), bytes, out);
|
||||
outc += bytes;
|
||||
}
|
||||
|
||||
if(ret == MPG123_ERR)
|
||||
{
|
||||
fprintf(stderr, "Error: %s", mpg123_strerror(m));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "Finished\n", (unsigned long)inc, (unsigned long)outc);
|
||||
|
||||
closewav();
|
||||
fclose(out);
|
||||
fclose(in);
|
||||
mpg123_delete(m);
|
||||
mpg123_exit();
|
||||
return 0;
|
||||
}
|
178
node_modules/lame/deps/mpg123/doc/examples/id3dump.c
generated
vendored
Normal file
178
node_modules/lame/deps/mpg123/doc/examples/id3dump.c
generated
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
/*
|
||||
id3dump: Print ID3 tags of files, scanned using libmpg123.
|
||||
|
||||
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
initially written by Thomas Orgis
|
||||
*/
|
||||
|
||||
#include "mpg123.h"
|
||||
#include <string.h>
|
||||
#include "stdio.h"
|
||||
#include "sys/types.h"
|
||||
|
||||
/* Helper for v1 printing, get these strings their zero byte. */
|
||||
void safe_print(char* name, char *data, size_t size)
|
||||
{
|
||||
char safe[31];
|
||||
if(size>30) return;
|
||||
|
||||
memcpy(safe, data, size);
|
||||
safe[size] = 0;
|
||||
printf("%s: %s\n", name, safe);
|
||||
}
|
||||
|
||||
/* Print out ID3v1 info. */
|
||||
void print_v1(mpg123_id3v1 *v1)
|
||||
{
|
||||
safe_print("Title", v1->title, sizeof(v1->title));
|
||||
safe_print("Artist", v1->artist, sizeof(v1->artist));
|
||||
safe_print("Album", v1->album, sizeof(v1->album));
|
||||
safe_print("Year", v1->year, sizeof(v1->year));
|
||||
safe_print("Comment", v1->comment, sizeof(v1->comment));
|
||||
printf("Genre: %i", v1->genre);
|
||||
}
|
||||
|
||||
/* Split up a number of lines separated by \n, \r, both or just zero byte
|
||||
and print out each line with specified prefix. */
|
||||
void print_lines(const char* prefix, mpg123_string *inlines)
|
||||
{
|
||||
size_t i;
|
||||
int hadcr = 0, hadlf = 0;
|
||||
char *lines = NULL;
|
||||
char *line = NULL;
|
||||
size_t len = 0;
|
||||
|
||||
if(inlines != NULL && inlines->fill)
|
||||
{
|
||||
lines = inlines->p;
|
||||
len = inlines->fill;
|
||||
}
|
||||
else return;
|
||||
|
||||
line = lines;
|
||||
for(i=0; i<len; ++i)
|
||||
{
|
||||
if(lines[i] == '\n' || lines[i] == '\r' || lines[i] == 0)
|
||||
{
|
||||
char save = lines[i]; /* saving, changing, restoring a byte in the data */
|
||||
if(save == '\n') ++hadlf;
|
||||
if(save == '\r') ++hadcr;
|
||||
if((hadcr || hadlf) && hadlf % 2 == 0 && hadcr % 2 == 0) line = "";
|
||||
|
||||
if(line)
|
||||
{
|
||||
lines[i] = 0;
|
||||
printf("%s%s\n", prefix, line);
|
||||
line = NULL;
|
||||
lines[i] = save;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hadlf = hadcr = 0;
|
||||
if(line == NULL) line = lines+i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Print out the named ID3v2 fields. */
|
||||
void print_v2(mpg123_id3v2 *v2)
|
||||
{
|
||||
print_lines("Title: ", v2->title);
|
||||
print_lines("Artist: ", v2->artist);
|
||||
print_lines("Album: ", v2->album);
|
||||
print_lines("Year: ", v2->year);
|
||||
print_lines("Comment: ", v2->comment);
|
||||
print_lines("Genre: ", v2->genre);
|
||||
}
|
||||
|
||||
/* Print out all stored ID3v2 fields with their 4-character IDs. */
|
||||
void print_raw_v2(mpg123_id3v2 *v2)
|
||||
{
|
||||
size_t i;
|
||||
for(i=0; i<v2->texts; ++i)
|
||||
{
|
||||
char id[5];
|
||||
char lang[4];
|
||||
memcpy(id, v2->text[i].id, 4);
|
||||
id[4] = 0;
|
||||
memcpy(lang, v2->text[i].lang, 3);
|
||||
lang[3] = 0;
|
||||
if(v2->text[i].description.fill)
|
||||
printf("%s language(%s) description(%s)\n", id, lang, v2->text[i].description.p);
|
||||
else printf("%s language(%s)\n", id, lang);
|
||||
|
||||
print_lines(" ", &v2->text[i].text);
|
||||
}
|
||||
for(i=0; i<v2->extras; ++i)
|
||||
{
|
||||
char id[5];
|
||||
memcpy(id, v2->extra[i].id, 4);
|
||||
id[4] = 0;
|
||||
printf( "%s description(%s)\n",
|
||||
id,
|
||||
v2->extra[i].description.fill ? v2->extra[i].description.p : "" );
|
||||
print_lines(" ", &v2->extra[i].text);
|
||||
}
|
||||
for(i=0; i<v2->comments; ++i)
|
||||
{
|
||||
char id[5];
|
||||
char lang[4];
|
||||
memcpy(id, v2->comment_list[i].id, 4);
|
||||
id[4] = 0;
|
||||
memcpy(lang, v2->comment_list[i].lang, 3);
|
||||
lang[3] = 0;
|
||||
printf( "%s description(%s) language(%s): \n",
|
||||
id,
|
||||
v2->comment_list[i].description.fill ? v2->comment_list[i].description.p : "",
|
||||
lang );
|
||||
print_lines(" ", &v2->comment_list[i].text);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
mpg123_handle* m;
|
||||
if(argc < 2)
|
||||
{
|
||||
fprintf(stderr, "\nI will print some ID3 tag fields of MPEG audio files.\n");
|
||||
fprintf(stderr, "\nUsage: %s <mpeg audio file list>\n\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
mpg123_init();
|
||||
m = mpg123_new(NULL, NULL);
|
||||
|
||||
for(i=1; i < argc; ++i)
|
||||
{
|
||||
mpg123_id3v1 *v1;
|
||||
mpg123_id3v2 *v2;
|
||||
int meta;
|
||||
if(mpg123_open(m, argv[i]) != MPG123_OK)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s: %s\n", argv[i], mpg123_strerror(m));
|
||||
continue;
|
||||
}
|
||||
mpg123_scan(m);
|
||||
meta = mpg123_meta_check(m);
|
||||
if(meta & MPG123_ID3 && mpg123_id3(m, &v1, &v2) == MPG123_OK)
|
||||
{
|
||||
printf("Tag data on %s:\n", argv[i]);
|
||||
printf("\n==== ID3v1 ====\n");
|
||||
if(v1 != NULL) print_v1(v1);
|
||||
|
||||
printf("\n==== ID3v2 ====\n");
|
||||
if(v2 != NULL) print_v2(v2);
|
||||
|
||||
printf("\n==== ID3v2 Raw frames ====\n");
|
||||
if(v2 != NULL) print_raw_v2(v2);
|
||||
}
|
||||
else printf("Nothing found for %s.\n", argv[i]);
|
||||
|
||||
mpg123_close(m);
|
||||
}
|
||||
mpg123_delete(m);
|
||||
mpg123_exit();
|
||||
return 0;
|
||||
}
|
118
node_modules/lame/deps/mpg123/doc/examples/mpg123_to_wav.c
generated
vendored
Normal file
118
node_modules/lame/deps/mpg123/doc/examples/mpg123_to_wav.c
generated
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
/*
|
||||
mpg123_to_wav.c
|
||||
|
||||
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
initially written by Nicholas Humfrey
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
#include <mpg123.h>
|
||||
#include <sndfile.h>
|
||||
|
||||
|
||||
void usage()
|
||||
{
|
||||
printf("Usage: mpg123_to_wav <input> <output> [s16|f32 [ <buffersize>]]\n");
|
||||
exit(99);
|
||||
}
|
||||
|
||||
void cleanup(mpg123_handle *mh)
|
||||
{
|
||||
/* It's really to late for error checks here;-) */
|
||||
mpg123_close(mh);
|
||||
mpg123_delete(mh);
|
||||
mpg123_exit();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
SNDFILE* sndfile = NULL;
|
||||
SF_INFO sfinfo;
|
||||
mpg123_handle *mh = NULL;
|
||||
unsigned char* buffer = NULL;
|
||||
size_t buffer_size = 0;
|
||||
size_t done = 0;
|
||||
int channels = 0, encoding = 0;
|
||||
long rate = 0;
|
||||
int err = MPG123_OK;
|
||||
off_t samples = 0;
|
||||
|
||||
if (argc<3) usage();
|
||||
printf( "Input file: %s\n", argv[1]);
|
||||
printf( "Output file: %s\n", argv[2]);
|
||||
|
||||
err = mpg123_init();
|
||||
if(err != MPG123_OK || (mh = mpg123_new(NULL, &err)) == NULL)
|
||||
{
|
||||
fprintf(stderr, "Basic setup goes wrong: %s", mpg123_plain_strerror(err));
|
||||
cleanup(mh);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Simple hack to enable floating point output. */
|
||||
if(argc >= 4 && !strcmp(argv[3], "f32")) mpg123_param(mh, MPG123_ADD_FLAGS, MPG123_FORCE_FLOAT, 0.);
|
||||
|
||||
/* Let mpg123 work with the file, that excludes MPG123_NEED_MORE messages. */
|
||||
if( mpg123_open(mh, argv[1]) != MPG123_OK
|
||||
/* Peek into track and get first output format. */
|
||||
|| mpg123_getformat(mh, &rate, &channels, &encoding) != MPG123_OK )
|
||||
{
|
||||
fprintf( stderr, "Trouble with mpg123: %s\n", mpg123_strerror(mh) );
|
||||
cleanup(mh);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(encoding != MPG123_ENC_SIGNED_16 && encoding != MPG123_ENC_FLOAT_32)
|
||||
{ /* Signed 16 is the default output format anyways; it would actually by only different if we forced it.
|
||||
So this check is here just for this explanation. */
|
||||
cleanup(mh);
|
||||
fprintf(stderr, "Bad encoding: 0x%x!\n", encoding);
|
||||
return -2;
|
||||
}
|
||||
/* Ensure that this output format will not change (it could, when we allow it). */
|
||||
mpg123_format_none(mh);
|
||||
mpg123_format(mh, rate, channels, encoding);
|
||||
|
||||
bzero(&sfinfo, sizeof(sfinfo) );
|
||||
sfinfo.samplerate = rate;
|
||||
sfinfo.channels = channels;
|
||||
sfinfo.format = SF_FORMAT_WAV|(encoding == MPG123_ENC_SIGNED_16 ? SF_FORMAT_PCM_16 : SF_FORMAT_FLOAT);
|
||||
printf("Creating WAV with %i channels and %liHz.\n", channels, rate);
|
||||
|
||||
sndfile = sf_open(argv[2], SFM_WRITE, &sfinfo);
|
||||
if(sndfile == NULL){ fprintf(stderr, "Cannot open output file!\n"); cleanup(mh); return -2; }
|
||||
|
||||
/* Buffer could be almost any size here, mpg123_outblock() is just some recommendation.
|
||||
Important, especially for sndfile writing, is that the size is a multiple of sample size. */
|
||||
buffer_size = argc >= 5 ? atol(argv[4]) : mpg123_outblock(mh);
|
||||
buffer = malloc( buffer_size );
|
||||
|
||||
do
|
||||
{
|
||||
sf_count_t more_samples;
|
||||
err = mpg123_read( mh, buffer, buffer_size, &done );
|
||||
more_samples = encoding == MPG123_ENC_SIGNED_16
|
||||
? sf_write_short(sndfile, (short*)buffer, done/sizeof(short))
|
||||
: sf_write_float(sndfile, (float*)buffer, done/sizeof(float));
|
||||
if(more_samples < 0 || more_samples*mpg123_encsize(encoding) != done)
|
||||
{
|
||||
fprintf(stderr, "Warning: Written number of samples does not match the byte count we got from libmpg123: %li != %li\n", (long)(more_samples*mpg123_encsize(encoding)), (long)done);
|
||||
}
|
||||
samples += more_samples;
|
||||
/* We are not in feeder mode, so MPG123_OK, MPG123_ERR and MPG123_NEW_FORMAT are the only possibilities.
|
||||
We do not handle a new format, MPG123_DONE is the end... so abort on anything not MPG123_OK. */
|
||||
} while (err==MPG123_OK);
|
||||
|
||||
if(err != MPG123_DONE)
|
||||
fprintf( stderr, "Warning: Decoding ended prematurely because: %s\n",
|
||||
err == MPG123_ERR ? mpg123_strerror(mh) : mpg123_plain_strerror(err) );
|
||||
|
||||
sf_close( sndfile );
|
||||
|
||||
samples /= channels;
|
||||
printf("%li samples written.\n", (long)samples);
|
||||
cleanup(mh);
|
||||
return 0;
|
||||
}
|
92
node_modules/lame/deps/mpg123/doc/examples/mpglib.c
generated
vendored
Normal file
92
node_modules/lame/deps/mpg123/doc/examples/mpglib.c
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
mpglib: test program for libmpg123, in the style of the legacy mpglib test program
|
||||
|
||||
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
initially written by Thomas Orgis
|
||||
*/
|
||||
|
||||
#include <mpg123.h>
|
||||
|
||||
/* unistd.h is not available under MSVC,
|
||||
io.h defines the read and write functions */
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define INBUFF 16384
|
||||
#define OUTBUFF 32768
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
size_t size;
|
||||
unsigned char buf[INBUFF]; /* input buffer */
|
||||
unsigned char out[OUTBUFF]; /* output buffer */
|
||||
ssize_t len;
|
||||
int ret;
|
||||
size_t in = 0, outc = 0;
|
||||
mpg123_handle *m;
|
||||
|
||||
#ifdef _WIN32
|
||||
_setmode(_fileno(stdin),_O_BINARY);
|
||||
_setmode(_fileno(stdout),_O_BINARY);
|
||||
#endif
|
||||
|
||||
mpg123_init();
|
||||
m = mpg123_new(argc > 1 ? argv[1] : NULL, &ret);
|
||||
if(m == NULL)
|
||||
{
|
||||
fprintf(stderr,"Unable to create mpg123 handle: %s\n", mpg123_plain_strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
mpg123_param(m, MPG123_VERBOSE, 2, 0); /* Brabble a bit about the parsing/decoding. */
|
||||
|
||||
/* Now mpg123 is being prepared for feeding. The main loop will read chunks from stdin and feed them to mpg123;
|
||||
then take decoded data as available to write to stdout. */
|
||||
mpg123_open_feed(m);
|
||||
if(m == NULL) return -1;
|
||||
|
||||
fprintf(stderr, "Feed me some MPEG audio to stdin, I will decode to stdout.\n");
|
||||
while(1) /* Read and write until everything is through. */
|
||||
{
|
||||
len = read(0,buf,INBUFF);
|
||||
if(len <= 0)
|
||||
{
|
||||
fprintf(stderr, "input data end\n");
|
||||
break;
|
||||
}
|
||||
in += len;
|
||||
/* Feed input chunk and get first chunk of decoded audio. */
|
||||
ret = mpg123_decode(m,buf,len,out,OUTBUFF,&size);
|
||||
if(ret == MPG123_NEW_FORMAT)
|
||||
{
|
||||
long rate;
|
||||
int channels, enc;
|
||||
mpg123_getformat(m, &rate, &channels, &enc);
|
||||
fprintf(stderr, "New format: %li Hz, %i channels, encoding value %i\n", rate, channels, enc);
|
||||
}
|
||||
write(1,out,size);
|
||||
outc += size;
|
||||
while(ret != MPG123_ERR && ret != MPG123_NEED_MORE)
|
||||
{ /* Get all decoded audio that is available now before feeding more input. */
|
||||
ret = mpg123_decode(m,NULL,0,out,OUTBUFF,&size);
|
||||
write(1,out,size);
|
||||
outc += size;
|
||||
}
|
||||
if(ret == MPG123_ERR){ fprintf(stderr, "some error: %s", mpg123_strerror(m)); break; }
|
||||
}
|
||||
fprintf(stderr, "%lu bytes in, %lu bytes out\n", (unsigned long)in, (unsigned long)outc);
|
||||
|
||||
/* Done decoding, now just clean up and leave. */
|
||||
mpg123_delete(m);
|
||||
mpg123_exit();
|
||||
return 0;
|
||||
}
|
47
node_modules/lame/deps/mpg123/doc/examples/scan.c
generated
vendored
Normal file
47
node_modules/lame/deps/mpg123/doc/examples/scan.c
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
scan: Estimate length (sample count) of a mpeg file and compare to length from exact scan.
|
||||
|
||||
copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
|
||||
see COPYING and AUTHORS files in distribution or http://mpg123.org
|
||||
initially written by Thomas Orgis
|
||||
*/
|
||||
|
||||
/* Note the lack of error checking here.
|
||||
While it would be nicer to inform the user about troubles, libmpg123 is designed _not_ to bite you on operations with invalid handles , etc.
|
||||
You just jet invalid results on invalid operations... */
|
||||
|
||||
#include <mpg123.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
mpg123_handle *m;
|
||||
int i;
|
||||
if(argc < 2)
|
||||
{
|
||||
fprintf(stderr, "\nI will give you the estimated and exact sample lengths of MPEG audio files.\n");
|
||||
fprintf(stderr, "\nUsage: %s <mpeg audio file list>\n\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
mpg123_init();
|
||||
m = mpg123_new(NULL, NULL);
|
||||
mpg123_param(m, MPG123_RESYNC_LIMIT, -1, 0); /* New in library version 0.0.1 . */
|
||||
for(i = 1; i < argc; ++i)
|
||||
{
|
||||
off_t a, b;
|
||||
|
||||
mpg123_open(m, argv[i]);
|
||||
|
||||
a = mpg123_length(m);
|
||||
mpg123_scan(m);
|
||||
b = mpg123_length(m);
|
||||
|
||||
mpg123_close(m);
|
||||
|
||||
printf("File %i: estimated %li vs. scanned %li\n", i, (long)a, (long)b);
|
||||
}
|
||||
|
||||
mpg123_delete(m);
|
||||
mpg123_exit();
|
||||
return 0;
|
||||
}
|
84
node_modules/lame/deps/mpg123/doc/libmpg123_speed.txt
generated
vendored
Normal file
84
node_modules/lame/deps/mpg123/doc/libmpg123_speed.txt
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
This is historic... one should make a new investigation.
|
||||
What I can say that a quick test of pre0.59s versus 1.7.3 with generic decoder on my x86-64 GNU/Linux box is not able to call a winner (or looser, for that matter).
|
||||
Though, 1.8.0 will make the new libmpg123 a winner, because there is new optimization code going on!
|
||||
|
||||
The move to libmpg123 means some more code separation / interfacing and especially the move of any local static variables into the mpg123_handle to make multiple stream handling possible.
|
||||
That may very well have an impact on performance of the mpg123 decoder.
|
||||
I made some tests, even using gcc's -pg option and gprof, with mixed result: SSE and MMX on my Thinkpad X31 are slower, especially the asm synth funtion, while the generic code is fine.
|
||||
On the other hand, on a K6-3+ using the same gcc version 4.1.2, the library based mpg123 is _faster_ for MMX and 3DNowExt.
|
||||
Epecially the mmx synth is faster... while the 3DNowExt synth is slower, too (it's the same code as SSE synth, just calling different dct64) - but speedups in other regions still make 3DNowExt of the library mpg123 more efficient.
|
||||
|
||||
What I can clearly say is that dropping the multi-cpu support via ./configure --with-cpu does help in for both monolithic and library mpg123, but that is no wonder as it removes indirection.
|
||||
The main point stays, though: On my Thinkpad the library is slow, on the K6-3+ it's fast.
|
||||
|
||||
What's the point to get here? I am not sure. We're depending on the compiler optimization (btw: Intel Compiler doesn't change the relation for the Thinkpad; not tested on the K6).
|
||||
I guess that for my Thinkpad another gcc version could invert the picture again...
|
||||
Also, I am not sure how far I should trust the gprof analysis... but it can be right; even when there is no apparent cause for the speed difference in the code itself, it could be some effect of cache and memory access.
|
||||
Some reordering of instructions and data... for sure that happened.
|
||||
|
||||
I'll need further numbers to conclude anything about the (positive/negative) impact my code changes have.
|
||||
|
||||
OK, ran the test of trunk against branches/mpg123lib on my media box with AMD Geode (AthlonXP, actually):
|
||||
|
||||
thomas@kiste:~$ for i in mpg123-lib mpg123-trunk; do for cpu in mmx 3dnowext sse; do echo $i $cpu; time $i/src/mpg123 --cpu $cpu -q -t /thorma/var/music/metallica/ride_the_lightning/*.mp3; done; done
|
||||
mpg123-lib mmx
|
||||
|
||||
real 0m25.949s
|
||||
user 0m25.395s
|
||||
sys 0m0.534s
|
||||
mpg123-lib 3dnowext
|
||||
|
||||
real 0m25.442s
|
||||
user 0m24.863s
|
||||
sys 0m0.558s
|
||||
mpg123-lib sse
|
||||
|
||||
real 0m25.794s
|
||||
user 0m25.214s
|
||||
sys 0m0.562s
|
||||
mpg123-trunk mmx
|
||||
|
||||
real 0m26.650s
|
||||
user 0m26.004s
|
||||
sys 0m0.626s
|
||||
mpg123-trunk 3dnowext
|
||||
|
||||
real 0m25.886s
|
||||
user 0m25.262s
|
||||
sys 0m0.600s
|
||||
mpg123-trunk sse
|
||||
|
||||
real 0m25.695s
|
||||
user 0m25.136s
|
||||
sys 0m0.539s
|
||||
thomas@kiste:~$ for i in mpg123-lib mpg123-trunk; do for cpu in 3dnow; do echo $i $cpu; time $i/src/mpg123 --cpu $cpu -q -t /thorma/var/music/metallica/ride_the_lightning/*.mp3; done; done
|
||||
mpg123-lib 3dnow
|
||||
|
||||
real 0m33.011s
|
||||
user 0m32.365s
|
||||
sys 0m0.621s
|
||||
mpg123-trunk 3dnow
|
||||
|
||||
real 0m32.830s
|
||||
user 0m32.192s
|
||||
sys 0m0.619s
|
||||
|
||||
|
||||
You can't really make a decision there. It's tight.
|
||||
What worries me a bit is the total loose of 3DNow against MMX - should it be that drastic?
|
||||
Well, it's higher quality, at least.
|
||||
|
||||
|
||||
Addendum: The game on an K6-3+
|
||||
|
||||
On mpg123 < 1.8.0, he 3DNowExt decoder used to be slower than the 3DNow decoder. Only recently it has been observed, that the simplification of the runtime decoder choice code sped up that one significantly, towards the same performance level as the single-decoder build of mpg123 1.6.4 (-with-cpu=3dnowext_alone having broken build in later versions:-/).
|
||||
We are talking about a difference of 20% here... there is something special about the K6-3+ that makes is that sensitive to how the function pointers get thrown around.
|
||||
|
||||
Example numbers: Dynamic x86 build of 1.6.4, 3DNowExt needs 5.9 s, 3DNow 5.6 s.
|
||||
3DNowExt-only build: 4.9 s
|
||||
3DNow-only build: 5.6 s
|
||||
Now... dynamic build of mpg123 trunk of 2010-05-24: 3DNowExt 4.9 s, 3DNow 5.6 s. That's how it should be. One might investigate how exactly the old ways before mpg123 1.8 worked against the K6-3+ ... possibly helping performance issues seen with the mpg123 coded for MPlayer on that CPU.
|
||||
|
||||
--
|
||||
Thomas.
|
||||
|
Reference in New Issue
Block a user