3 LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/lib:$LD_LIBRARY_PATH
5 PATH=../src/flac:../src/test_streams:../obj/bin:$PATH
7 echo "Generating streams..."
8 if test_streams ; then : ; else
9 echo "ERROR during test_streams" 1>&2
20 echo -n "$name: encode..."
21 cmd="flac -V -s -fr -fb -fs 44100 -fp $bps -fc $channels $encode_options $name.raw $name.flac"
22 echo "### ENCODE $name #######################################################" >> ./streams.log
23 echo "### cmd=$cmd" >> ./streams.log
24 if $cmd 1>/dev/null 2>>./streams.log ; then : ; else
25 echo "ERROR during encode of $name" 1>&2
29 cmd="flac -s -fb -d -fr $name.flac $name.cmp";
30 echo "### DECODE $name #######################################################" >> ./streams.log
31 echo "### cmd=$cmd" >> ./streams.log
32 if $cmd 2>>./streams.log ; then : ; else
33 echo "ERROR during decode of $name" 1>&2
36 ls -1l $name.raw >> ./streams.log
37 ls -1l $name.flac >> ./streams.log
38 ls -1l $name.cmp >> ./streams.log
40 if cmp $name.raw $name.cmp ; then : ; else
41 echo "ERROR during compare of $name" 1>&2
47 echo "Testing small files..."
48 test_file test01 1 16 "-0 -l 8 -m -e"
49 test_file test02 2 16 "-0 -l 8 -m -e"
50 test_file test03 1 16 "-0 -l 8 -m -e"
51 test_file test04 2 16 "-0 -l 8 -m -e"
53 echo "Testing 8-bit full-scale deflection streams..."
54 for b in 01 02 03 04 05 06 07 ; do
55 test_file fsd8-$b 1 8 "-0 -l 8 -m -e -q 15"
58 echo "Testing 16-bit full-scale deflection streams..."
59 for b in 01 02 03 04 05 06 07 ; do
60 test_file fsd16-$b 1 16 "-0 -l 8 -m -e -q 15"
63 echo "Testing 24-bit full-scale deflection streams..."
64 for b in 01 02 03 04 05 06 07 ; do
65 test_file fsd24-$b 1 24 "-0 -l 8 -m -e -q 7"
69 echo "Testing $bps-bit sine wave streams..."
70 for b in 00 01 02 03 04 ; do
71 test_file sine${bps}-$b 1 $bps "-0 -l 8 -m -e"
73 for b in 10 11 12 13 14 15 16 17 18 19 ; do
74 test_file sine${bps}-$b 2 $bps "-0 -l 8 -m -e"
78 echo "Testing some frame header variations..."
79 test_file sine16-01 1 16 "-0 -l 8 -m -e --lax -b 16"
80 test_file sine16-01 1 16 "-0 -l 8 -m -e --lax -b 65535"
81 test_file sine16-01 1 16 "-0 -l 8 -m -e -b 16"
82 test_file sine16-01 1 16 "-0 -l 8 -m -e -b 65535"
83 test_file sine16-01 1 16 "-0 -l 8 -m -e --lax -fs 9"
84 test_file sine16-01 1 16 "-0 -l 8 -m -e --lax -fs 90"
85 test_file sine16-01 1 16 "-0 -l 8 -m -e --lax -fs 90000"
86 test_file sine16-01 1 16 "-0 -l 8 -m -e -fs 9"
87 test_file sine16-01 1 16 "-0 -l 8 -m -e -fs 90"
88 test_file sine16-01 1 16 "-0 -l 8 -m -e -fs 90000"
90 echo "Testing option variations..."
91 for f in 00 01 02 03 04 ; do
92 for opt in 0 1 2 4 5 6 8 ; do
93 for extras in '' '-p' '-e' ; do
94 test_file sine16-$f 1 16 "-$opt $extras"
98 for f in 10 11 12 13 14 15 16 17 18 19 ; do
99 for opt in 0 1 2 4 5 6 8 ; do
100 for extras in '' '-p' '-e' ; do
101 test_file sine16-$f 2 16 "-$opt $extras"
106 echo "Testing noise..."
107 for opt in 0 1 2 4 5 6 8 ; do
108 for extras in '' '-p' '-e' ; do
109 for blocksize in '' '-b 32' '-b 32768' '-b 65535' ; do
110 for channels in 1 2 4 8 ; do
111 for bps in 8 16 24 ; do
112 test_file noise $channels $bps "-$opt $extras $blocksize"