Commit 9419199c authored by Stefan Westerfeld's avatar Stefan Westerfeld

TESTS: use audiowmark test function to improve debugging output

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 9f8d93be
......@@ -5,7 +5,7 @@ source test-common.sh
IN_WAV=block-decoder-test.wav
OUT_WAV=block-decoder-test-out.wav
$AUDIOWMARK test-gen-noise $IN_WAV 200 44100 || die "failed to generate noise"
audiowmark test-gen-noise $IN_WAV 200 44100
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
audiowmark_cmp $OUT_WAV $TEST_MSG
......
......@@ -6,10 +6,11 @@ IN_WAV=clip-decoder-test.wav
OUT_WAV=clip-decoder-test-out.wav
CUT_WAV=clip-decoder-test-out-cut.wav
$AUDIOWMARK test-gen-noise $IN_WAV 30 44100 || die "failed to generate noise"
audiowmark test-gen-noise $IN_WAV 30 44100
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
audiowmark_cmp $OUT_WAV $TEST_MSG
$AUDIOWMARK cut-start $OUT_WAV $CUT_WAV 44300 || die "failed to cut input"
# cut 1 second 300 samples
audiowmark cut-start $OUT_WAV $CUT_WAV 44300
audiowmark_cmp $CUT_WAV $TEST_MSG
rm $IN_WAV $OUT_WAV $CUT_WAV
......
......@@ -6,11 +6,11 @@ IN_WAV=detect-speed-test.wav
OUT_WAV=detect-speed-test-out.wav
OUTS_WAV=detect-speed-test-out-spd.wav
$AUDIOWMARK test-gen-noise detect-speed-test.wav 30 44100 || die "failed to generate noise"
for SPEED in 0.9764 1.01
audiowmark test-gen-noise detect-speed-test.wav 30 44100
for SPEED in 0.9764 1.0 1.01
do
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
$AUDIOWMARK test-change-speed $OUT_WAV $OUTS_WAV $SPEED || die "failed to change speed"
audiowmark test-change-speed $OUT_WAV $OUTS_WAV $SPEED
audiowmark_cmp $OUTS_WAV $TEST_MSG --detect-speed --test-speed $SPEED
audiowmark_cmp $OUTS_WAV $TEST_MSG --detect-speed-patient --test-speed $SPEED
done
......
......@@ -5,7 +5,7 @@ source test-common.sh
IN_WAV=pipe-test.wav
OUT_WAV=pipe-test-out.wav
$AUDIOWMARK test-gen-noise $IN_WAV 200 44100 || die "failed to generate noise"
audiowmark test-gen-noise $IN_WAV 200 44100
cat $IN_WAV | audiowmark_add - - $TEST_MSG > $OUT_WAV || die "watermark from pipe failed"
audiowmark_cmp $OUT_WAV $TEST_MSG
cat $OUT_WAV | audiowmark_cmp - $TEST_MSG || die "watermark detection from pipe failed"
......
......@@ -5,7 +5,7 @@ source test-common.sh
IN_WAV=short-playload-test.wav
OUT_WAV=short-playload-test-out.wav
$AUDIOWMARK test-gen-noise $IN_WAV 200 44100 || die "failed to generate noise"
audiowmark test-gen-noise $IN_WAV 200 44100
audiowmark_add --short 12 $IN_WAV $OUT_WAV abc
audiowmark_cmp --short 12 $OUT_WAV abc
audiowmark_add --short 16 $IN_WAV $OUT_WAV abcd
......
......@@ -6,10 +6,10 @@ IN_WAV=sync-test.wav
OUT_WAV=sync-test-out.wav
CUT_WAV=sync-test-cut.wav
$AUDIOWMARK test-gen-noise $IN_WAV 200 44100 || die "failed to generate noise"
audiowmark test-gen-noise $IN_WAV 200 44100
audiowmark_add $IN_WAV $OUT_WAV $TEST_MSG
# cut 20 seconds and 300 samples
$AUDIOWMARK cut-start $OUT_WAV $CUT_WAV 882300 || die "failed to cut input"
audiowmark cut-start $OUT_WAV $CUT_WAV 882300
audiowmark_cmp $CUT_WAV $TEST_MSG
rm $IN_WAV $OUT_WAV $CUT_WAV
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment