[patch] external MPEG audio decoding using libmpg123

Thomas Orgis <[email protected]> Sun, 27 May 2018 16:34:59 +0200
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <20180527163459.65f5f965@sturbolzen>
Hi all,

this is an updated version of my patch to enable use of libmpg123 from
lame, facilitating future deprecation of the internal mpglib fork. With
the patch, a suitable libmpg123 is detected and replaces mpglib by
default. Configure switches override that.

The necessary changes to the libmpg123 API are in mpg123 development
trunk and I am waiting with a release until it is confirmed that the
API additions are good for LAME use (namely, mp3x). So you need a
procedure along this to test the patch:

#!/bin/sh
set -e
workdir=$(mktemp -d -t lametest.XXXXX)
echo "working directory: $workdir"
cd $workdir
# creates mpg123-$TIMESTAMP.tar.bz2
# Alternatively, fetch svn://scm.orgis.org/mpg123/trunk and
# run `autoreconf -iv` there.
wget --content-disposition https://mpg123.org/snapshot
tar -xf mpg123-*.tar.bz2
cd mpg123-*/
./configure --prefix=$workdir/mpg123
make -j3
make install
cd $workdir
wget https://mpg123.org/test/lame-svn-r6432-libmpg123.patch
svn co https://svn.code.sf.net/p/lame/svn/trunk/lame lame
cd lame
patch -Np0 < ../lame-svn-r6432-libmpg123.patch
autoreconf
# gnu89 needed for mp3x, with gtk1
# If you do not care, remove --enable-mp3x.
CFLAGS="-std=gnu89 $CFLAGS" \
PKG_CONFIG_PATH=$workdir/mpg123/lib/pkgconfig:$PKG_CONFIG_PATH \
./configure --enable-mp3x --enable-libmpg123
make -j3
pwd
# Now test things in frontend/.

Once it is confirmed that we can fix the libmpg123 API, I will release
version 1.26.0 and a subsequent LAME release can rely on this official
mpg123 version.

I manually specified the list of files to svn diff to avoid including
all the autotool noise.

Please review the patch for all the bad hackery that I have committed
and test if it works despite all ugliness;-)


Alrighty then,

Thomas
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot