Mercurial > hg > sonic-annotator
view tests/test-parse-errors/test-parse-errors.sh @ 269:39fb206b1153 piper-nopiper
Filter out Xing/LAME info frames, rather than letting them go to the mp3 decoder as if they were audio frames. Fixes the 1152-sample zero pad at start of some decoded mp3 files (distinct from decoder delay). The logic here is based on the madplay code.
author | Chris Cannam |
---|---|
date | Thu, 24 Nov 2016 13:32:04 +0000 |
parents | 56ff594b022c |
children |
line wrap: on
line source
#!/bin/bash . ../include.sh infile=$audiopath/3clicks8.wav tmpfile=$mypath/tmp_$$ trap "rm -f $tmpfile" 0 for transform in "$mypath"/inputs/* ; do base=$(basename "$transform") expected="$mypath"/expected/"$base".txt if [ ! -f "$expected" ]; then fail "Internal error: Expected file $expected not found for transform $transform" fi if $r -t "$transform" -w csv --csv-one-file /dev/null "$infile" 2>"$tmpfile" ; then fail "Erroneously succeeds in running bogus transform $transform" fi cat "$expected" | while read line; do if ! fgrep -q "$line" "$tmpfile" ; then fail "Expected output text \"$line\" not found in diagnostic output for transform $base" fi done done