shithub: sox

Download patch

ref: 33ad4396fceac8f1bb579e79b5b7ddbf7fba386a
parent: 9cf62a52de4d834160378bb6b8f4cfe9237110bc
author: robs <robs>
date: Sat Apr 21 16:25:14 EDT 2007

Added tests for amr-wb

diff: cannot open b/src/amr-wb-vectors//null: file does not exist: 'b/src/amr-wb-vectors//null'
--- /dev/null
+++ b/src/amr-wb-test
@@ -1,0 +1,28 @@
+#!/bin/sh
+
+testv=amr-wb-vectors
+
+test() {
+  c=coded-$compression-$input.amr-wb
+  d=decoded-$compression-$input.au
+  ./sox $testv/input-$input.au -C$compression $c
+  cmp $c $testv/$c || exit 1
+  ./sox $c --comment= $d
+  cmp $d $testv/$d || exit 1
+  rm $c $d
+}
+
+input=sing
+compression=8
+while [ $compression \-ge 0 ]; do
+  output=tst_m$compression
+  test
+  compression=`expr $compression \- 1`
+done
+
+input=dtx
+compression=2
+output=coded
+test
+
+exit 1
binary files /dev/null b/src/amr-wb-vectors/coded-0-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-1-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-2-dtx.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-2-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-3-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-4-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-5-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-6-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-7-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/coded-8-sing.amr-wb differ
binary files /dev/null b/src/amr-wb-vectors/decoded-0-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-1-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-2-dtx.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-2-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-3-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-4-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-5-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-6-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-7-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/decoded-8-sing.au differ
binary files /dev/null b/src/amr-wb-vectors/input-dtx.au differ
binary files /dev/null b/src/amr-wb-vectors/input-sing.au differ
--- a/src/tests.sh
+++ b/src/tests.sh
@@ -166,6 +166,14 @@
 fi
 do_singlechannel_formats
 
+./amr-wb-test
+if [ $? -eq 0 ]; then
+  echo "ok     amr-wb"
+else
+  echo "*FAIL* amr-wb"
+  exit 1
+fi
+
 channels=2
 samples=10000000
 timeIO sb ub sw uw s3 u3 sl u4 raw Raw au wav aiff aifc caf sph # FIXME?: flac dat