aboutsummaryrefslogtreecommitdiffstats
path: root/tests/update_ref_files.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/update_ref_files.sh')
-rwxr-xr-xtests/update_ref_files.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/update_ref_files.sh b/tests/update_ref_files.sh
new file mode 100755
index 0000000..1d095ef
--- /dev/null
+++ b/tests/update_ref_files.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# This script re-generates the reference data shipped together with
+# gapk. To be used by gapk maintainers only.
+
+. ./common.sh
+
+INFILE=$1
+OUTDIR=$REFDIR
+
+
+for f in $FORMATS; do
+ BASE=`basename $INFILE`
+ OUTFILE=$OUTDIR/$BASE.$f
+ echo
+ echo Format $f: Encoding $INFILE to $OUTFILE
+ $GAPK -f rawpcm-s16le -i $INFILE -g $f -o $OUTFILE
+
+ DECFILE=$OUTFILE.s16
+ echo Format $f: Decoding $OUTFILE to $DECFILE
+ $GAPK -f $f -i $OUTFILE -g rawpcm-s16le -o $DECFILE
+done