annotate tests/test-vamp-test-plugin/test-vamp-test-plugin.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 ffa60ff17a86
children 23b1e214014a
rev   line source
Chris@75 1 #!/bin/bash
Chris@75 2
Chris@119 3 . ../include.sh
Chris@75 4
Chris@119 5 infile=$audiopath/20sec-silence.wav
Chris@75 6 tmpcsv=$mypath/tmp_1_$$.csv
Chris@75 7
Chris@75 8 trap "rm -f $tmpcsv" 0
Chris@75 9
Chris@256 10 $r --transform-minversion $testplug 4 || \
Chris@256 11 fail "Vamp Test Plugin version is too old (at least v4 required)"
Chris@256 12
Chris@256 13 for output in instants curve-oss curve-fsr curve-fsr-timed curve-fsr-mixed curve-vsr grid-oss grid-fsr notes-regions; do
Chris@75 14
Chris@75 15 $r -d "$testplug:$output" -w csv --csv-one-file "$tmpcsv" --csv-force "$infile" 2>/dev/null || \
Chris@75 16 fail "Failed to run for plugin $testplug with output $output"
Chris@75 17
Chris@75 18 csvcompare_ignorefirst "$tmpcsv" "$mypath/expected/vamp-test-plugin-$output.csv" || \
Chris@256 19 faildiff "Output differs from expected for $output" "$tmpcsv" "$mypath/expected/vamp-test-plugin-$output.csv"
Chris@75 20
Chris@75 21 done
Chris@75 22
Chris@75 23 exit 0
Chris@75 24