chiark / gitweb /
Decoder tests no longer depend on being able to run oggdec etc.
authorRichard Kettlewell <rjk@greenend.org.uk>
Sat, 21 Nov 2009 11:27:47 +0000 (11:27 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sat, 21 Nov 2009 11:27:47 +0000 (11:27 +0000)
.bzrignore
server/Makefile.am
server/test-config [new file with mode: 0644]
sounds/Makefile.am
sounds/long.ogg [new file with mode: 0644]
sounds/scratch.flac [new file with mode: 0644]
sounds/scratch.mp3 [new file with mode: 0644]
sounds/scratch.raw [new file with mode: 0644]
sounds/scratch.wav [new file with mode: 0644]

index 21c00de..0cb8173 100644 (file)
@@ -143,8 +143,6 @@ lib/versionstring.h
 scripts/setup
 examples/disorder.rc
 scripts/teardown
-sounds/long.ogg
-sounds/slap.raw
 server/disorder-choose
 libtests/t-addr
 libtests/t-basen
index 376b53f..358d2cc 100644 (file)
@@ -117,39 +117,33 @@ check-help: all
        ./disorder-choose --help > /dev/null
        ./disorder-choose --version > /dev/null
 
-check-decode: disorder-decode disorder-normalize endian
-       echo "speaker_backend network" > config
-       echo "broadcast 127.255.255.255 9" > config
-       oggdec -b 16 -e `./endian` -R -s 1 -o oggdec.raw ${top_srcdir}/sounds/scratch.ogg
-       @$(MAKE) check-ogg
-       @$(MAKE) check-wav
-       @if which flac >/dev/null 2>&1; then $(MAKE) check-flac; fi
-       rm -f config oggdec.raw
-
-# TODO mp3 - but sox doesn't (reliably) know how to encode to it
-
-check-ogg:
+check-decode: check-ogg check-wav check-flac
+
+# TODO!
+check-mp3: disorder-decode disorder-normalize
+       ./disorder-decode ${top_srcdir}/sounds/scratch.mp3 | \
+         ./disorder-normalize --config test-config > mp3ed.raw
+       cmp mp3ed.raw ${top_srcdir}/sounds/scratch-mp3.raw
+       rm -f mp3ed.raw
+
+check-ogg: disorder-decode disorder-normalize
        ./disorder-decode ${top_srcdir}/sounds/scratch.ogg | \
-         ./disorder-normalize --config config > ogged.raw
-       cmp ogged.raw oggdec.raw
+         ./disorder-normalize --config test-config > ogged.raw
+       cmp ogged.raw ${top_srcdir}/sounds/scratch.raw
        rm -f ogged.raw
 
-check-wav:
-       sox ${top_srcdir}/sounds/scratch.ogg scratch.wav
-       ./disorder-decode scratch.wav | \
-         ./disorder-normalize --config config > waved.raw
-       cmp waved.raw oggdec.raw
-       rm -rf scratch.wav waved.raw
-
-check-flac:
-       rm -f scratch.wav scratch.flac
-       sox ${top_srcdir}/sounds/scratch.ogg scratch.wav
-       flac scratch.wav
-       ./disorder-decode scratch.flac | \
-         ./disorder-normalize --config config > flacced.raw
-       cmp flacced.raw oggdec.raw
-       rm -f scratch.flac scratch.wav flacced.raw
-
-EXTRA_DIST=README.dbversions
+check-wav: disorder-decode disorder-normalize
+       ./disorder-decode ${top_srcdir}/sounds/scratch.wav | \
+         ./disorder-normalize --config test-config > waved.raw
+       cmp waved.raw ${top_srcdir}/sounds/scratch.raw
+       rm -rf waved.raw
+
+check-flac: disorder-decode disorder-normalize
+       ./disorder-decode ${top_srcdir}/sounds/scratch.flac | \
+         ./disorder-normalize --config test-config > flacced.raw
+       cmp flacced.raw ${top_srcdir}/sounds/scratch.raw
+       rm -f flacced.raw
+
+EXTRA_DIST=README.dbversions test-config
 
 CLEANFILES=*.gcda *.gcov *.gcno *.c.html index.html
diff --git a/server/test-config b/server/test-config
new file mode 100644 (file)
index 0000000..8cdd179
--- /dev/null
@@ -0,0 +1,6 @@
+# Dummy config file for decoder testing
+
+api command
+speaker_command true
+sample_format 16b/44100/2
+
index f91d194..a5598b7 100644 (file)
 
 pkgdata_DATA=slap.ogg scratch.ogg
 
-EXTRA_DIST=${pkgdata_DATA}
-
-check: long.ogg
-
-%.raw: %.ogg
-       oggdec -b16 -R -o $@ $<
-
-long.ogg: slap.raw
-       cat slap.raw slap.raw slap.raw slap.raw slap.raw slap.raw \
-               slap.raw slap.raw | oggenc -r -o $@ -
-
-clean-local:
-       rm -f long.ogg slap.raw
+EXTRA_DIST=${pkgdata_DATA} \
+       scratch.wav scratch.flac scratch.mp3 scratch.raw long.ogg
diff --git a/sounds/long.ogg b/sounds/long.ogg
new file mode 100644 (file)
index 0000000..977f96a
Binary files /dev/null and b/sounds/long.ogg differ
diff --git a/sounds/scratch.flac b/sounds/scratch.flac
new file mode 100644 (file)
index 0000000..4d1df45
Binary files /dev/null and b/sounds/scratch.flac differ
diff --git a/sounds/scratch.mp3 b/sounds/scratch.mp3
new file mode 100644 (file)
index 0000000..ee915a2
Binary files /dev/null and b/sounds/scratch.mp3 differ
diff --git a/sounds/scratch.raw b/sounds/scratch.raw
new file mode 100644 (file)
index 0000000..1564205
Binary files /dev/null and b/sounds/scratch.raw differ
diff --git a/sounds/scratch.wav b/sounds/scratch.wav
new file mode 100644 (file)
index 0000000..28be862
Binary files /dev/null and b/sounds/scratch.wav differ