summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@civ.zcu.cz>2014-07-06 19:29:07 +0200
committerFrantišek Dvořák <valtri@civ.zcu.cz>2014-07-06 19:29:07 +0200
commitd4ebba1493ec429bc2256f50ed4c2bb247f37f7c (patch)
treef0912fcfaf285e66583e375875c8bc4a8e58b5e6
parent332c5e4672c28dd97e9512e47ca2bdf383a1bf3b (diff)
downloadcodecs-testing-mingw-d4ebba1493ec429bc2256f50ed4c2bb247f37f7c.tar.gz
codecs-testing-mingw-d4ebba1493ec429bc2256f50ed4c2bb247f37f7c.tar.xz
codecs-testing-mingw-d4ebba1493ec429bc2256f50ed4c2bb247f37f7c.zip
Testing libmad.
-rw-r--r--Makefile2
-rwxr-xr-xcombiner/libmad.pl53
-rwxr-xr-xcombiner/libmad32.pl53
-rw-r--r--libmad/Makefile45
-rw-r--r--libmad/README28
l---------libmad321
6 files changed, 181 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5219e30..07e705a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-TARGETS=flac speex wavpack
+TARGETS=flac libmad libmad32 speex wavpack
all: $(TARGETS)
diff --git a/combiner/libmad.pl b/combiner/libmad.pl
new file mode 100755
index 0000000..266a9c1
--- /dev/null
+++ b/combiner/libmad.pl
@@ -0,0 +1,53 @@
+#! /usr/bin/perl -w
+
+use strict;
+use warnings;
+use Combiner;
+
+my ($cmd, $dir);
+
+my @combs = (
+ [
+ ["-b 8", "-b 16", "-b 24", "-b 32", ""],
+ ["-R 11025", "-R 22050", "-R 44100", ""],
+ ],
+ [
+ ["-d", "--downsample", "-d --downsample"],
+ ],
+ [
+ ["-1", "-2", "-m", "-S"],
+ ],
+);
+
+my @inits = (\&nop, \&init_w64);
+
+my @callbacks = (
+ sub($$) {
+ my ($name, $opts) = @_;
+
+ print "madplay $opts -o wave:linux/$name.wav 1.mp3\n";
+ },
+ sub($$) {
+ my ($name, $opts) = @_;
+
+ print "build_win64/madplay.exe $opts -o wave:win64/$name.wav 1.mp3\n";
+ }
+);
+
+print qq[#! /bin/sh -ex
+rm -rf linux win64
+mkdir linux win64
+
+];
+
+combiners(\@inits, \@callbacks, \@combs);
+
+print qq[
+pushd linux
+for w in *.wav; do
+ md5sum \$w ../win64/\$w
+ cmp \$w ../win64/\$w
+ echo
+done
+popd
+];
diff --git a/combiner/libmad32.pl b/combiner/libmad32.pl
new file mode 100755
index 0000000..0c8bd27
--- /dev/null
+++ b/combiner/libmad32.pl
@@ -0,0 +1,53 @@
+#! /usr/bin/perl -w
+
+use strict;
+use warnings;
+use Combiner;
+
+my ($cmd, $dir);
+
+my @combs = (
+ [
+ ["-b 8", "-b 16", "-b 24", "-b 32", ""],
+ ["-R 11025", "-R 22050", "-R 44100", ""],
+ ],
+ [
+ ["-d", "--downsample", "-d --downsample"],
+ ],
+ [
+ ["-1", "-2", "-m", "-S"],
+ ],
+);
+
+my @inits = (\&nop, \&init_w32);
+
+my @callbacks = (
+ sub($$) {
+ my ($name, $opts) = @_;
+
+ print "madplay $opts -o wave:linux32/$name.wav 1.mp3\n";
+ },
+ sub($$) {
+ my ($name, $opts) = @_;
+
+ print "build_win32/madplay.exe $opts -o wave:win32/$name.wav 1.mp3\n";
+ }
+);
+
+print qq[#! /bin/sh -ex
+rm -rf linux32 win32
+mkdir linux32 win32
+
+];
+
+combiners(\@inits, \@callbacks, \@combs);
+
+print qq[
+pushd linux32
+for w in *.wav; do
+ md5sum \$w ../win32/\$w
+ cmp \$w ../win32/\$w
+ echo
+done
+popd
+];
diff --git a/libmad/Makefile b/libmad/Makefile
new file mode 100644
index 0000000..b6288d9
--- /dev/null
+++ b/libmad/Makefile
@@ -0,0 +1,45 @@
+VERSION=0.15.2b
+NAME=madplay
+SRCDIR=$(NAME)-$(VERSION)
+TARBALL=$(NAME)-$(VERSION).tar.gz
+URL=http://download.sourceforge.net/mad/$(TARBALL)
+
+all build: build_win32 build_win64
+
+fetch: $(TARBALL)
+
+prep: $(SRCDIR)
+
+clean:
+ rm -rf $(SRCDIR) build_win32 build_win64
+
+distclean: clean
+ rm -f $(TARBALL)
+
+$(TARBALL):
+ wget -nv -N $(URL)
+
+$(SRCDIR): $(TARBALL)
+ tar xzf $(TARBALL)
+ (cd $(NAME)-$(VERSION); \
+ touch AUTHORS ChangeLog NEWS; \
+ autoreconf -sfi; \
+ )
+
+build_win32: $(SRCDIR)
+ rm -rf $@
+ mkdir $@
+ (cd $@; \
+ ../$(SRCDIR)/configure --host=i686-w64-mingw32 --build=x86_64-redhat-linux; \
+ make -j2; \
+ )
+
+build_win64: $(SRCDIR)
+ rm -rf $@
+ mkdir $@
+ (cd $@; \
+ ../$(SRCDIR)/configure --host=x86_64-w64-mingw32 --build=x86_64-redhat-linux; \
+ make -j2; \
+ )
+
+.PHONY: all build fetch prep clean
diff --git a/libmad/README b/libmad/README
new file mode 100644
index 0000000..b2c42ad
--- /dev/null
+++ b/libmad/README
@@ -0,0 +1,28 @@
+==== Packages ====
+
+yum install automake autoconf libtool make mingw32-gcc mingw32-libid3tag mingw64-gcc mingw64-libid3tag
+yum install --enablerepo=rpmfusion-free-updates-testing mingw32-libmad mingw64-libmad
+yum install madplay
+
+# or 32-bit testing - install 32-bit native madplay manually
+#yum install libid3tag.i686
+#rpm -ivh ...
+
+==== Info ====
+
+Output of the decoder is different on 32-bit and 64-bit architecture ==> use libmad.sh or libmad32.sh according to architecture. Then only MinGW or MinGW64 build will be tested. You can also test MinGW32 version on 64-bit system when you install 32-bit madplay package manually.
+
+
+==== Steps ====
+
+0) Environment has been set up and make has been called (see init.sh in the project root).
+
+1) Copy or link the mp3 file for using in tests locally, named as 1.mp3.
+
+2) build madplay using MinGW
+ make
+
+3) launch tests
+
+ ./libmad.sh
+ #./libmad32.sh
diff --git a/libmad32 b/libmad32
new file mode 120000
index 0000000..8cf5c5e
--- /dev/null
+++ b/libmad32
@@ -0,0 +1 @@
+libmad \ No newline at end of file