diff run-tests.sh @ 28:69ee50c19c0c tip

Add decimate-b
author Chris Cannam
date Tue, 22 Oct 2013 08:59:42 +0100
parents 20ed07459176
children
line wrap: on
line diff
--- a/run-tests.sh	Mon Oct 21 17:41:43 2013 +0100
+++ b/run-tests.sh	Tue Oct 22 08:59:42 2013 +0100
@@ -7,12 +7,13 @@
 
 factors="2 4 8 16 32 64"
 signals="sweep lengthy"
-impls="zoh decimate resample_hq resample_mq resample_lq src"
+impls="zoh decimate decimate_b resample_hq resample_mq resample_lq src"
 
 original=96000
 
 resample="$mydir/qm-dsp-resample/resample"
 decimate="$mydir/qm-dsp-decimate/decimate"
+decimate_b="$mydir/qm-dsp-decimate/decimate-b"
 
 indir="$mydir"/testsignals
 
@@ -29,6 +30,11 @@
     exit 1
 fi
 
+if [ ! -x "$decimate_b" ]; then
+    echo "Program $decimate_b not found: make not run, or make failed?"
+    exit 1
+fi
+
 if ! sndfile-resample 2>&1 | grep -q samplerate ; then
     echo "Program sndfile-resample not found in PATH?"
     exit 1
@@ -96,6 +102,13 @@
     esac
 }
 
+do_decimate_b() {
+    factor="$1"
+    infile="$2"
+    outfile="$3"
+    time "$decimate_b" --by "$factor" "$infile" "$outfile"
+}
+
 for s in $signals; do
     for f in $factors; do
 	for impl in $impls; do