blob: ce3fd6fe9ae86d4ab8426c52edc5bc2a6e42e474 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
# release compile
mkdir -p bin
cc -o bin/flacdec_r -Wall -Wextra -Wpedantic -O3 -g ./flacdec.c
mkdir -p tmp
for f in "$@"; do
#echo "decoding $f to bits1.raw"
./bin/flacdec_r --dry --dump-samples=tmp/bits1.raw "$f" 2>/dev/null
#echo "decoding $f to bits2.raw with reference decoder"
flac -d -s -f --force-raw-format --endian=little --sign=signed -o tmp/bits2.raw "$f"
out=$(cmp tmp/bits1.raw tmp/bits2.raw 2>&1)
if [ $? -eq 0 ]; then
echo "PASS: $f"
continue
fi
echo "FAIL: $f"
echo "$out"
done
|