3 # FLAC - Free Lossless Audio Codec
4 # Copyright (C) 2001,2002,2003,2004,2005,2006 Josh Coalson
6 # This file is part the FLAC project. FLAC is comprised of several
7 # components distributed under difference licenses. The codec libraries
8 # are distributed under Xiph.Org's BSD-like license (see the file
9 # COPYING.Xiph in this distribution). All other programs, libraries, and
10 # plugins are distributed under the GPL (see COPYING.GPL). The documentation
11 # is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
12 # FLAC distribution contains at the top the terms under which it may be
15 # Since this particular file is relevant to all components of FLAC,
16 # it may be distributed under the Xiph.Org license, which is the least
17 # restrictive of those mentioned above. See the file COPYING.Xiph in this
26 if [ x = x"$1" ] ; then
32 LD_LIBRARY_PATH=../src/libFLAC/.libs:$LD_LIBRARY_PATH
33 LD_LIBRARY_PATH=../src/libOggFLAC/.libs:$LD_LIBRARY_PATH
34 LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH
35 LD_LIBRARY_PATH=../src/share/getopt/.libs:$LD_LIBRARY_PATH
36 LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH
37 LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH
38 LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH
39 LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH
40 export LD_LIBRARY_PATH
41 PATH=../src/flac:$PATH
42 PATH=../src/metaflac:$PATH
43 PATH=../src/test_streams:$PATH
44 PATH=../obj/$BUILD/bin:$PATH
46 flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
50 if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
51 valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_flac.valgrind.log
59 if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
60 valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_flac.valgrind.log
66 if [ `env | grep -ic '^comspec='` != 0 ] ; then
72 echo "Checking for --ogg support in flac..."
73 if flac --ogg --silent --force-raw-format --endian=little --sign=signed --channels=1 --bps=8 --sample-rate=44100 -c $0 1>/dev/null 2>&1 ; then
75 echo "flac --ogg works"
78 echo "flac --ogg doesn't work"
82 echo "Generating streams..."
83 if [ ! -f wacky1.wav ] ; then
84 test_streams || die "ERROR during test_streams"
87 ############################################################################
88 # test that flac doesn't automatically overwrite files unless -f is used
89 ############################################################################
91 echo "Try encoding to a file that exists; should fail"
92 cp wacky1.wav exist.wav
94 if run_flac --totally-silent -0 exist.wav ; then
95 die "ERROR: it should have failed but didn't"
97 echo "OK, it failed as it should"
100 echo "Try encoding with -f to a file that exists; should succeed"
101 if run_flac --totally-silent -0 --force exist.wav ; then
102 echo "OK, it succeeded as it should"
104 die "ERROR: it should have succeeded but didn't"
107 echo "Try decoding to a file that exists; should fail"
108 if run_flac --totally-silent -d exist.flac ; then
109 die "ERROR: it should have failed but didn't"
111 echo "OK, it failed as it should"
114 echo "Try decoding with -f to a file that exists; should succeed"
115 if run_flac --totally-silent -d -f exist.flac ; then
116 echo "OK, it succeeded as it should"
118 die "ERROR: it should have succeeded but didn't"
121 rm -f exist.wav exist.flac
123 ############################################################################
124 # basic 'round-trip' tests of various kinds of streams
125 ############################################################################
130 channels=`echo $f | awk -F- '{print $2}'`
131 bytes_per_sample=`echo $f | awk -F- '{print $3}'`
132 bps=`expr $bytes_per_sample '*' 8`
133 echo -n "round-trip test ($f) encode... "
134 run_flac --silent --force --verify --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $f -o rt.flac || die "ERROR"
136 run_flac --silent --force --decode --force-raw-format --endian=little --sign=signed -o rt.raw rt.flac || die "ERROR"
137 echo -n "compare... "
138 cmp $f rt.raw || die "ERROR: file mismatch"
146 echo -n "round-trip test ($f) encode... "
147 run_flac --silent --force --verify $f -o rt.flac || die "ERROR"
149 run_flac --silent --force --decode -o rt.wav rt.flac || die "ERROR"
150 echo -n "compare... "
151 cmp $f rt.wav || die "ERROR: file mismatch"
159 echo -n "round-trip test ($f) encode... "
160 run_flac --silent --force --verify $f -o rt.flac || die "ERROR"
162 run_flac --silent --force --decode -o rt.aiff rt.flac || die "ERROR"
163 echo -n "compare... "
164 cmp $f rt.aiff || die "ERROR: file mismatch"
166 rm -f rt.flac rt.aiff
169 for f in rt-*.raw ; do
172 for f in rt-*.wav ; do
175 for f in rt-*.aiff ; do
179 ############################################################################
180 # test --skip and --until
181 ############################################################################
184 # first make some chopped-up raw files
186 echo "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMN" > master.raw
187 dddie="die ERROR: creating files with dd"
188 dd if=master.raw ibs=1 count=50 of=50c.raw 2>/dev/null || $dddie
189 dd if=master.raw ibs=1 skip=10 count=40 of=50c.skip10.raw 2>/dev/null || $dddie
190 dd if=master.raw ibs=1 skip=11 count=39 of=50c.skip11.raw 2>/dev/null || $dddie
191 dd if=master.raw ibs=1 skip=20 count=30 of=50c.skip20.raw 2>/dev/null || $dddie
192 dd if=master.raw ibs=1 skip=30 count=20 of=50c.skip30.raw 2>/dev/null || $dddie
193 dd if=master.raw ibs=1 skip=40 count=10 of=50c.skip40.raw 2>/dev/null || $dddie
194 dd if=master.raw ibs=1 count=10 of=50c.until10.raw 2>/dev/null || $dddie
195 dd if=master.raw ibs=1 count=20 of=50c.until20.raw 2>/dev/null || $dddie
196 dd if=master.raw ibs=1 count=30 of=50c.until30.raw 2>/dev/null || $dddie
197 dd if=master.raw ibs=1 count=39 of=50c.until39.raw 2>/dev/null || $dddie
198 dd if=master.raw ibs=1 count=40 of=50c.until40.raw 2>/dev/null || $dddie
199 dd if=master.raw ibs=1 skip=10 count=20 of=50c.skip10.until30.raw 2>/dev/null || $dddie
200 dd if=master.raw ibs=1 skip=10 count=29 of=50c.skip10.until39.raw 2>/dev/null || $dddie
201 dd if=master.raw ibs=1 skip=10 count=30 of=50c.skip10.until40.raw 2>/dev/null || $dddie
202 dd if=master.raw ibs=1 skip=20 count=10 of=50c.skip20.until30.raw 2>/dev/null || $dddie
203 dd if=master.raw ibs=1 skip=20 count=20 of=50c.skip20.until40.raw 2>/dev/null || $dddie
205 wav_eopt="--silent --force --verify --lax"
206 wav_dopt="--silent --force --decode"
208 raw_eopt="$wav_eopt --force-raw-format --endian=big --sign=signed --sample-rate=10 --bps=8 --channels=1"
209 raw_dopt="$wav_dopt --force-raw-format --endian=big --sign=signed"
212 # convert them to WAVE and AIFF files
216 run_flac "$2" $1.raw || die "ERROR converting $1.raw to WAVE"
217 run_flac "$3" $1.flac || die "ERROR converting $1.raw to WAVE"
219 convert_to_wav 50c "$raw_eopt" "$wav_dopt"
220 convert_to_wav 50c.skip10 "$raw_eopt" "$wav_dopt"
221 convert_to_wav 50c.skip11 "$raw_eopt" "$wav_dopt"
222 convert_to_wav 50c.skip20 "$raw_eopt" "$wav_dopt"
223 convert_to_wav 50c.skip30 "$raw_eopt" "$wav_dopt"
224 convert_to_wav 50c.skip40 "$raw_eopt" "$wav_dopt"
225 convert_to_wav 50c.until10 "$raw_eopt" "$wav_dopt"
226 convert_to_wav 50c.until20 "$raw_eopt" "$wav_dopt"
227 convert_to_wav 50c.until30 "$raw_eopt" "$wav_dopt"
228 convert_to_wav 50c.until39 "$raw_eopt" "$wav_dopt"
229 convert_to_wav 50c.until40 "$raw_eopt" "$wav_dopt"
230 convert_to_wav 50c.skip10.until30 "$raw_eopt" "$wav_dopt"
231 convert_to_wav 50c.skip10.until39 "$raw_eopt" "$wav_dopt"
232 convert_to_wav 50c.skip10.until40 "$raw_eopt" "$wav_dopt"
233 convert_to_wav 50c.skip20.until30 "$raw_eopt" "$wav_dopt"
234 convert_to_wav 50c.skip20.until40 "$raw_eopt" "$wav_dopt"
238 run_flac "$2" $1.raw || die "ERROR converting $1.raw to AIFF"
239 run_flac "$3" $1.flac -o $1.aiff || die "ERROR converting $1.raw to AIFF"
241 convert_to_aiff 50c "$raw_eopt" "$wav_dopt"
242 convert_to_aiff 50c.skip10 "$raw_eopt" "$wav_dopt"
243 convert_to_aiff 50c.skip11 "$raw_eopt" "$wav_dopt"
244 convert_to_aiff 50c.skip20 "$raw_eopt" "$wav_dopt"
245 convert_to_aiff 50c.skip30 "$raw_eopt" "$wav_dopt"
246 convert_to_aiff 50c.skip40 "$raw_eopt" "$wav_dopt"
247 convert_to_aiff 50c.until10 "$raw_eopt" "$wav_dopt"
248 convert_to_aiff 50c.until20 "$raw_eopt" "$wav_dopt"
249 convert_to_aiff 50c.until30 "$raw_eopt" "$wav_dopt"
250 convert_to_aiff 50c.until39 "$raw_eopt" "$wav_dopt"
251 convert_to_aiff 50c.until40 "$raw_eopt" "$wav_dopt"
252 convert_to_aiff 50c.skip10.until30 "$raw_eopt" "$wav_dopt"
253 convert_to_aiff 50c.skip10.until39 "$raw_eopt" "$wav_dopt"
254 convert_to_aiff 50c.skip10.until40 "$raw_eopt" "$wav_dopt"
255 convert_to_aiff 50c.skip20.until30 "$raw_eopt" "$wav_dopt"
256 convert_to_aiff 50c.skip20.until40 "$raw_eopt" "$wav_dopt"
263 [ "$in_fmt" = wav ] || [ "$in_fmt" = aiff ] || [ "$in_fmt" = raw ] || die "ERROR: internal error, bad 'in' format '$in_fmt'"
265 [ "$out_fmt" = flac ] || [ "$out_fmt" = ogg ] || die "ERROR: internal error, bad 'out' format '$out_fmt'"
267 if [ $in_fmt = raw ] ; then
275 if [ $out_fmt = ogg ] ; then
280 # test --skip when encoding
283 desc="($in_fmt<->$out_fmt)"
285 echo -n "testing --skip=# (encode) $desc... "
286 run_flac $eopt --skip=10 -o z50c.skip10.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
287 run_flac $dopt -o z50c.skip10.$in_fmt z50c.skip10.$out_fmt || die "ERROR decoding FLAC file $desc"
288 cmp 50c.skip10.$in_fmt z50c.skip10.$in_fmt || die "ERROR: file mismatch for --skip=10 (encode) $desc"
289 rm -f z50c.skip10.$out_fmt z50c.skip10.$in_fmt
292 echo -n "testing --skip=mm:ss (encode) $desc... "
293 run_flac $eopt --skip=0:01 -o z50c.skip0:01.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
294 run_flac $dopt -o z50c.skip0:01.$in_fmt z50c.skip0:01.$out_fmt || die "ERROR decoding FLAC file $desc"
295 cmp 50c.skip10.$in_fmt z50c.skip0:01.$in_fmt || die "ERROR: file mismatch for --skip=0:01 (encode) $desc"
296 rm -f z50c.skip0:01.$out_fmt z50c.skip0:01.$in_fmt
299 echo -n "testing --skip=mm:ss.sss (encode) $desc... "
300 run_flac $eopt --skip=0:01.1001 -o z50c.skip0:01.1001.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
301 run_flac $dopt -o z50c.skip0:01.1001.$in_fmt z50c.skip0:01.1001.$out_fmt || die "ERROR decoding FLAC file $desc"
302 cmp 50c.skip11.$in_fmt z50c.skip0:01.1001.$in_fmt || die "ERROR: file mismatch for --skip=0:01.1001 (encode) $desc"
303 rm -f z50c.skip0:01.1001.$out_fmt z50c.skip0:01.1001.$in_fmt
307 # test --skip when decoding
310 echo -n "testing --skip=# (decode) $desc... "
311 run_flac $eopt -o z50c.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
312 run_flac $dopt --skip=10 -o z50c.skip10.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
313 cmp 50c.skip10.$in_fmt z50c.skip10.$in_fmt || die "ERROR: file mismatch for --skip=10 (decode) $desc"
314 rm -f z50c.skip10.$in_fmt
317 echo -n "testing --skip=mm:ss (decode) $desc... "
318 run_flac $dopt --skip=0:01 -o z50c.skip0:01.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
319 cmp 50c.skip10.$in_fmt z50c.skip0:01.$in_fmt || die "ERROR: file mismatch for --skip=0:01 (decode) $desc"
320 rm -f z50c.skip0:01.$in_fmt
323 echo -n "testing --skip=mm:ss.sss (decode) $desc... "
324 run_flac $dopt --skip=0:01.1001 -o z50c.skip0:01.1001.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
325 cmp 50c.skip11.$in_fmt z50c.skip0:01.1001.$in_fmt || die "ERROR: file mismatch for --skip=0:01.1001 (decode) $desc"
326 rm -f z50c.skip0:01.1001.$in_fmt
332 # test --until when encoding
335 echo -n "testing --until=# (encode) $desc... "
336 run_flac $eopt --until=40 -o z50c.until40.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
337 run_flac $dopt -o z50c.until40.$in_fmt z50c.until40.$out_fmt || die "ERROR decoding FLAC file $desc"
338 cmp 50c.until40.$in_fmt z50c.until40.$in_fmt || die "ERROR: file mismatch for --until=40 (encode) $desc"
339 rm -f z50c.until40.$out_fmt z50c.until40.$in_fmt
342 echo -n "testing --until=mm:ss (encode) $desc... "
343 run_flac $eopt --until=0:04 -o z50c.until0:04.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
344 run_flac $dopt -o z50c.until0:04.$in_fmt z50c.until0:04.$out_fmt || die "ERROR decoding FLAC file $desc"
345 cmp 50c.until40.$in_fmt z50c.until0:04.$in_fmt || die "ERROR: file mismatch for --until=0:04 (encode) $desc"
346 rm -f z50c.until0:04.$out_fmt z50c.until0:04.$in_fmt
349 echo -n "testing --until=mm:ss.sss (encode) $desc... "
350 run_flac $eopt --until=0:03.9001 -o z50c.until0:03.9001.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
351 run_flac $dopt -o z50c.until0:03.9001.$in_fmt z50c.until0:03.9001.$out_fmt || die "ERROR decoding FLAC file $desc"
352 cmp 50c.until39.$in_fmt z50c.until0:03.9001.$in_fmt || die "ERROR: file mismatch for --until=0:03.9001 (encode) $desc"
353 rm -f z50c.until0:03.9001.$out_fmt z50c.until0:03.9001.$in_fmt
356 echo -n "testing --until=-# (encode) $desc... "
357 run_flac $eopt --until=-10 -o z50c.until-10.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
358 run_flac $dopt -o z50c.until-10.$in_fmt z50c.until-10.$out_fmt || die "ERROR decoding FLAC file $desc"
359 cmp 50c.until40.$in_fmt z50c.until-10.$in_fmt || die "ERROR: file mismatch for --until=-10 (encode) $desc"
360 rm -f z50c.until-10.$out_fmt z50c.until-10.$in_fmt
363 echo -n "testing --until=-mm:ss (encode) $desc... "
364 run_flac $eopt --until=-0:01 -o z50c.until-0:01.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
365 run_flac $dopt -o z50c.until-0:01.$in_fmt z50c.until-0:01.$out_fmt || die "ERROR decoding FLAC file $desc"
366 cmp 50c.until40.$in_fmt z50c.until-0:01.$in_fmt || die "ERROR: file mismatch for --until=-0:01 (encode) $desc"
367 rm -f z50c.until-0:01.$out_fmt z50c.until-0:01.$in_fmt
370 echo -n "testing --until=-mm:ss.sss (encode) $desc... "
371 run_flac $eopt --until=-0:01.1001 -o z50c.until-0:01.1001.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
372 run_flac $dopt -o z50c.until-0:01.1001.$in_fmt z50c.until-0:01.1001.$out_fmt || die "ERROR decoding FLAC file $desc"
373 cmp 50c.until39.$in_fmt z50c.until-0:01.1001.$in_fmt || die "ERROR: file mismatch for --until=-0:01.1001 (encode) $desc"
374 rm -f z50c.until-0:01.1001.$out_fmt z50c.until-0:01.1001.$in_fmt
378 # test --until when decoding
381 run_flac $eopt -o z50c.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
383 echo -n "testing --until=# (decode) $desc... "
384 run_flac $dopt --until=40 -o z50c.until40.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
385 cmp 50c.until40.$in_fmt z50c.until40.$in_fmt || die "ERROR: file mismatch for --until=40 (decode) $desc"
386 rm -f z50c.until40.$in_fmt
389 echo -n "testing --until=mm:ss (decode) $desc... "
390 run_flac $dopt --until=0:04 -o z50c.until0:04.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
391 cmp 50c.until40.$in_fmt z50c.until0:04.$in_fmt || die "ERROR: file mismatch for --until=0:04 (decode) $desc"
392 rm -f z50c.until0:04.$in_fmt
395 echo -n "testing --until=mm:ss.sss (decode) $desc... "
396 run_flac $dopt --until=0:03.9001 -o z50c.until0:03.9001.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
397 cmp 50c.until39.$in_fmt z50c.until0:03.9001.$in_fmt || die "ERROR: file mismatch for --until=0:03.9001 (decode) $desc"
398 rm -f z50c.until0:03.9001.$in_fmt
401 echo -n "testing --until=-# (decode) $desc... "
402 run_flac $dopt --until=-10 -o z50c.until-10.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
403 cmp 50c.until40.$in_fmt z50c.until-10.$in_fmt || die "ERROR: file mismatch for --until=-10 (decode) $desc"
404 rm -f z50c.until-10.$in_fmt
407 echo -n "testing --until=-mm:ss (decode) $desc... "
408 run_flac $dopt --until=-0:01 -o z50c.until-0:01.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
409 cmp 50c.until40.$in_fmt z50c.until-0:01.$in_fmt || die "ERROR: file mismatch for --until=-0:01 (decode) $desc"
410 rm -f z50c.until-0:01.$in_fmt
413 echo -n "testing --until=-mm:ss.sss (decode) $desc... "
414 run_flac $dopt --until=-0:01.1001 -o z50c.until-0:01.1001.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
415 cmp 50c.until39.$in_fmt z50c.until-0:01.1001.$in_fmt || die "ERROR: file mismatch for --until=-0:01.1001 (decode) $desc"
416 rm -f z50c.until-0:01.1001.$in_fmt
422 # test --skip and --until when encoding
425 echo -n "testing --skip=10 --until=# (encode) $desc... "
426 run_flac $eopt --skip=10 --until=40 -o z50c.skip10.until40.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
427 run_flac $dopt -o z50c.skip10.until40.$in_fmt z50c.skip10.until40.$out_fmt || die "ERROR decoding FLAC file $desc"
428 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until40.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=40 (encode) $desc"
429 rm -f z50c.skip10.until40.$out_fmt z50c.skip10.until40.$in_fmt
432 echo -n "testing --skip=10 --until=mm:ss (encode) $desc... "
433 run_flac $eopt --skip=10 --until=0:04 -o z50c.skip10.until0:04.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
434 run_flac $dopt -o z50c.skip10.until0:04.$in_fmt z50c.skip10.until0:04.$out_fmt || die "ERROR decoding FLAC file $desc"
435 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until0:04.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=0:04 (encode) $desc"
436 rm -f z50c.skip10.until0:04.$out_fmt z50c.skip10.until0:04.$in_fmt
439 echo -n "testing --skip=10 --until=mm:ss.sss (encode) $desc... "
440 run_flac $eopt --skip=10 --until=0:03.9001 -o z50c.skip10.until0:03.9001.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
441 run_flac $dopt -o z50c.skip10.until0:03.9001.$in_fmt z50c.skip10.until0:03.9001.$out_fmt || die "ERROR decoding FLAC file $desc"
442 cmp 50c.skip10.until39.$in_fmt z50c.skip10.until0:03.9001.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=0:03.9001 (encode) $desc"
443 rm -f z50c.skip10.until0:03.9001.$out_fmt z50c.skip10.until0:03.9001.$in_fmt
446 echo -n "testing --skip=10 --until=+# (encode) $desc... "
447 run_flac $eopt --skip=10 --until=+30 -o z50c.skip10.until+30.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
448 run_flac $dopt -o z50c.skip10.until+30.$in_fmt z50c.skip10.until+30.$out_fmt || die "ERROR decoding FLAC file $desc"
449 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until+30.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=+30 (encode) $desc"
450 rm -f z50c.skip10.until+30.$out_fmt z50c.skip10.until+30.$in_fmt
453 echo -n "testing --skip=10 --until=+mm:ss (encode) $desc... "
454 run_flac $eopt --skip=10 --until=+0:03 -o z50c.skip10.until+0:03.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
455 run_flac $dopt -o z50c.skip10.until+0:03.$in_fmt z50c.skip10.until+0:03.$out_fmt || die "ERROR decoding FLAC file $desc"
456 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until+0:03.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=+0:03 (encode) $desc"
457 rm -f z50c.skip10.until+0:03.$out_fmt z50c.skip10.until+0:03.$in_fmt
460 echo -n "testing --skip=10 --until=+mm:ss.sss (encode) $desc... "
461 run_flac $eopt --skip=10 --until=+0:02.9001 -o z50c.skip10.until+0:02.9001.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
462 run_flac $dopt -o z50c.skip10.until+0:02.9001.$in_fmt z50c.skip10.until+0:02.9001.$out_fmt || die "ERROR decoding FLAC file $desc"
463 cmp 50c.skip10.until39.$in_fmt z50c.skip10.until+0:02.9001.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=+0:02.9001 (encode) $desc"
464 rm -f z50c.skip10.until+0:02.9001.$out_fmt z50c.skip10.until+0:02.9001.$in_fmt
467 echo -n "testing --skip=10 --until=-# (encode) $desc... "
468 run_flac $eopt --skip=10 --until=-10 -o z50c.skip10.until-10.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
469 run_flac $dopt -o z50c.skip10.until-10.$in_fmt z50c.skip10.until-10.$out_fmt || die "ERROR decoding FLAC file $desc"
470 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until-10.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=-10 (encode) $desc"
471 rm -f z50c.skip10.until-10.$out_fmt z50c.skip10.until-10.$in_fmt
474 echo -n "testing --skip=10 --until=-mm:ss (encode) $desc... "
475 run_flac $eopt --skip=10 --until=-0:01 -o z50c.skip10.until-0:01.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
476 run_flac $dopt -o z50c.skip10.until-0:01.$in_fmt z50c.skip10.until-0:01.$out_fmt || die "ERROR decoding FLAC file $desc"
477 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until-0:01.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01 (encode) $desc"
478 rm -f z50c.skip10.until-0:01.$out_fmt z50c.skip10.until-0:01.$in_fmt
481 echo -n "testing --skip=10 --until=-mm:ss.sss (encode) $desc... "
482 run_flac $eopt --skip=10 --until=-0:01.1001 -o z50c.skip10.until-0:01.1001.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
483 run_flac $dopt -o z50c.skip10.until-0:01.1001.$in_fmt z50c.skip10.until-0:01.1001.$out_fmt || die "ERROR decoding FLAC file $desc"
484 cmp 50c.skip10.until39.$in_fmt z50c.skip10.until-0:01.1001.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01.1001 (encode) $desc"
485 rm -f z50c.skip10.until-0:01.1001.$out_fmt z50c.skip10.until-0:01.1001.$in_fmt
489 # test --skip and --until when decoding
492 run_flac $eopt -o z50c.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
494 echo -n "testing --skip=10 --until=# (decode) $desc... "
495 run_flac $dopt --skip=10 --until=40 -o z50c.skip10.until40.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
496 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until40.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=40 (decode) $desc"
497 rm -f z50c.skip10.until40.$in_fmt
500 echo -n "testing --skip=10 --until=mm:ss (decode) $desc... "
501 run_flac $dopt --skip=10 --until=0:04 -o z50c.skip10.until0:04.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
502 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until0:04.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=0:04 (decode) $desc"
503 rm -f z50c.skip10.until0:04.$in_fmt
506 echo -n "testing --skip=10 --until=mm:ss.sss (decode) $desc... "
507 run_flac $dopt --skip=10 --until=0:03.9001 -o z50c.skip10.until0:03.9001.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
508 cmp 50c.skip10.until39.$in_fmt z50c.skip10.until0:03.9001.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=0:03.9001 (decode) $desc"
509 rm -f z50c.skip10.until0:03.9001.$in_fmt
512 echo -n "testing --skip=10 --until=-# (decode) $desc... "
513 run_flac $dopt --skip=10 --until=-10 -o z50c.skip10.until-10.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
514 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until-10.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=-10 (decode) $desc"
515 rm -f z50c.skip10.until-10.$in_fmt
518 echo -n "testing --skip=10 --until=-mm:ss (decode) $desc... "
519 run_flac $dopt --skip=10 --until=-0:01 -o z50c.skip10.until-0:01.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
520 cmp 50c.skip10.until40.$in_fmt z50c.skip10.until-0:01.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01 (decode) $desc"
521 rm -f z50c.skip10.until-0:01.$in_fmt
524 echo -n "testing --skip=10 --until=-mm:ss.sss (decode) $desc... "
525 run_flac $dopt --skip=10 --until=-0:01.1001 -o z50c.skip10.until-0:01.1001.$in_fmt z50c.$out_fmt || die "ERROR decoding FLAC file $desc"
526 cmp 50c.skip10.until39.$in_fmt z50c.skip10.until-0:01.1001.$in_fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01.1001 (decode) $desc"
527 rm -f z50c.skip10.until-0:01.1001.$in_fmt
533 test_skip_until raw flac
534 test_skip_until wav flac
535 test_skip_until aiff flac
537 if [ $has_ogg = "yes" ] ; then
538 test_skip_until raw ogg
539 test_skip_until wav ogg
540 test_skip_until aiff ogg
543 echo "testing seek extremes:"
545 run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 --blocksize=576 noise.raw || die "ERROR generating FLAC file"
547 if [ $is_win = no ] ; then
548 total_noise_cdda_samples=`run_metaflac --show-total-samples noise.flac`
549 [ $? = 0 ] || die "ERROR getting total sample count from noise.flac"
551 # some flavors of cygwin don't seem to treat the \x0d as a word
552 # separator, so we hard code it. we'll just have to fix it later
553 # if we change the way noise.flac is made.
554 total_noise_cdda_samples=393216
557 echo -n "testing --skip=0... "
558 run_flac $wav_dopt --skip=0 -o z.wav noise.flac || die "ERROR decoding FLAC file noise.flac"
561 for delta in 2 1 ; do
562 n=`expr $total_noise_cdda_samples - $delta`
563 echo -n "testing --skip=$n... "
564 run_flac $wav_dopt --skip=$n -o z.wav noise.flac || die "ERROR decoding FLAC file noise.flac"
571 ############################################################################
573 ############################################################################
575 #@@@@@@ cat will not work on old cygwin, need to fix
576 if [ $is_win = no ] ; then
577 echo -n "testing --input-size=50 --skip=10... "
578 cat 50c.raw | run_flac $raw_eopt --input-size=50 --skip=10 -o z50c.skip10.flac - || die "ERROR generating FLAC file"
579 run_flac $raw_dopt -o z50c.skip10.raw z50c.skip10.flac || die "ERROR decoding FLAC file"
580 cmp 50c.skip10.raw z50c.skip10.raw || die "ERROR: file mismatch for --input-size=50 --skip=10"
581 rm -f z50c.skip10.raw z50c.skip10.flac
586 ############################################################################
587 # test --skip and --until
588 ############################################################################
590 ############################################################################
592 ############################################################################
595 # create the cue sheet
598 cat > $cuesheet << EOF
599 CATALOG 1234567890123
616 [ "$in_fmt" = wav ] || [ "$in_fmt" = aiff ] || [ "$in_fmt" = raw ] || die "ERROR: internal error, bad 'in' format '$in_fmt'"
618 [ "$out_fmt" = flac ] || [ "$out_fmt" = ogg ] || die "ERROR: internal error, bad 'out' format '$out_fmt'"
620 if [ $in_fmt = raw ] ; then
628 if [ $out_fmt = ogg ] ; then
632 desc="($in_fmt<->$out_fmt)"
635 # for this we need just need just one FLAC file; --cue only works while decoding
637 run_flac $eopt --cuesheet=$cuesheet -o z50c.cue.$out_fmt 50c.$in_fmt || die "ERROR generating FLAC file $desc"
639 # To make it easy to translate from cue point to sample numbers, the
640 # file has a sample rate of 10 Hz and a cuesheet like so:
642 # TRACK 01, INDEX 01 : 0:00.00 -> sample 0
643 # TRACK 01, INDEX 02 : 0:01.00 -> sample 10
644 # TRACK 01, INDEX 03 : 0:02.00 -> sample 20
645 # TRACK 02, INDEX 01 : 0:03.00 -> sample 30
646 # TRACK 04, INDEX 01 : 0:04.00 -> sample 40
648 echo -n "testing --cue=- $desc... "
649 run_flac $dopt -o z50c.cue.$in_fmt --cue=- z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
650 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=- $desc"
651 rm -f z50c.cue.$in_fmt
654 echo -n "testing --cue=1.0 $desc... "
655 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.0 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
656 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.0 $desc"
657 rm -f z50c.cue.$in_fmt
660 echo -n "testing --cue=1.0- $desc... "
661 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.0- z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
662 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.0- $desc"
663 rm -f z50c.cue.$in_fmt
666 echo -n "testing --cue=1.1 $desc... "
667 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.1 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
668 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.1 $desc"
669 rm -f z50c.cue.$in_fmt
672 echo -n "testing --cue=1.1- $desc... "
673 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.1- z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
674 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.1- $desc"
675 rm -f z50c.cue.$in_fmt
678 echo -n "testing --cue=1.2 $desc... "
679 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.2 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
680 cmp 50c.skip10.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.2 $desc"
681 rm -f z50c.cue.$in_fmt
684 echo -n "testing --cue=1.2- $desc... "
685 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.2- z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
686 cmp 50c.skip10.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.2- $desc"
687 rm -f z50c.cue.$in_fmt
690 echo -n "testing --cue=1.4 $desc... "
691 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.4 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
692 cmp 50c.skip20.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.4 $desc"
693 rm -f z50c.cue.$in_fmt
696 echo -n "testing --cue=1.4- $desc... "
697 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.4- z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
698 cmp 50c.skip20.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.4- $desc"
699 rm -f z50c.cue.$in_fmt
702 echo -n "testing --cue=-5.0 $desc... "
703 run_flac $dopt -o z50c.cue.$in_fmt --cue=-5.0 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
704 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=-5.0 $desc"
705 rm -f z50c.cue.$in_fmt
708 echo -n "testing --cue=-4.1 $desc... "
709 run_flac $dopt -o z50c.cue.$in_fmt --cue=-4.1 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
710 cmp 50c.until40.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=-4.1 $desc"
711 rm -f z50c.cue.$in_fmt
714 echo -n "testing --cue=-3.1 $desc... "
715 run_flac $dopt -o z50c.cue.$in_fmt --cue=-3.1 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
716 cmp 50c.until40.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=-3.1 $desc"
717 rm -f z50c.cue.$in_fmt
720 echo -n "testing --cue=-1.4 $desc... "
721 run_flac $dopt -o z50c.cue.$in_fmt --cue=-1.4 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
722 cmp 50c.until30.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=-1.4 $desc"
723 rm -f z50c.cue.$in_fmt
726 echo -n "testing --cue=1.0-5.0 $desc... "
727 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.0-5.0 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
728 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.0-5.0 $desc"
729 rm -f z50c.cue.$in_fmt
732 echo -n "testing --cue=1.1-5.0 $desc... "
733 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.1-5.0 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
734 cmp 50c.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.1-5.0 $desc"
735 rm -f z50c.cue.$in_fmt
738 echo -n "testing --cue=1.2-4.1 $desc... "
739 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.2-4.1 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
740 cmp 50c.skip10.until40.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.2-4.1 $desc"
741 rm -f z50c.cue.$in_fmt
744 echo -n "testing --cue=1.4-2.0 $desc... "
745 run_flac $dopt -o z50c.cue.$in_fmt --cue=1.4-2.0 z50c.cue.$out_fmt || die "ERROR decoding FLAC file $desc"
746 cmp 50c.skip20.until30.$in_fmt z50c.cue.$in_fmt || die "ERROR: file mismatch for --cue=1.4-2.0 $desc"
747 rm -f z50c.cue.$in_fmt
750 rm -f z50c.cue.$out_fmt
757 if [ $has_ogg = "yes" ] ; then
763 ############################################################################
764 # test 'fixup' code that happens when a FLAC file with total_samples == 0
765 # in the STREAMINFO block is converted to WAVE or AIFF, requiring the
766 # decoder go back and fix up the chunk headers
767 ############################################################################
769 echo -n "WAVE fixup test... "
771 echo -n "prepare... "
772 convert_to_wav noise "$raw_eopt" "$wav_dopt" || die "ERROR creating reference WAVE"
775 # the pipe from 'cat' to 'flac' does not work on cygwin because of the EOF/
776 # binary-mode stdin problem, so we use an undocumented option to metaflac to
777 # set the total sample count to 0
778 if [ $is_win = yes ] ; then
779 run_flac $raw_eopt noise.raw -o fixup.flac || die "ERROR generating FLAC file"
780 run_metaflac --set-total-samples=0 fixup.flac 2> /dev/null
782 cat noise.raw | run_flac $raw_eopt - -c > fixup.flac || die "ERROR generating FLAC file"
786 run_flac $wav_dopt fixup.flac -o fixup.wav || die "ERROR decoding FLAC file"
788 echo -n "compare... "
789 cmp noise.wav fixup.wav || die "ERROR: file mismatch"
792 rm -f noise.wav fixup.wav fixup.flac
794 echo -n "AIFF fixup test... "
796 echo -n "prepare... "
797 convert_to_aiff noise "$raw_eopt" "$wav_dopt" || die "ERROR creating reference AIFF"
800 # the pipe from 'cat' to 'flac' does not work on cygwin because of the EOF/
801 # binary-mode stdin problem, so we use an undocumented option to metaflac to
802 # set the total sample count to 0
803 if [ $is_win = yes ] ; then
804 run_flac $raw_eopt noise.raw -o fixup.flac || die "ERROR generating FLAC file"
805 run_metaflac --set-total-samples=0 fixup.flac 2> /dev/null
807 cat noise.raw | run_flac $raw_eopt - -c > fixup.flac || die "ERROR generating FLAC file"
811 run_flac $wav_dopt fixup.flac -o fixup.aiff || die "ERROR decoding FLAC file"
813 echo -n "compare... "
814 cmp noise.aiff fixup.aiff || die "ERROR: file mismatch"
817 rm -f noise.aiff fixup.aiff fixup.flac
820 ############################################################################
822 ############################################################################
824 echo "Generating multiple input files from noise..."
825 multifile_format_decode="--endian=big --sign=signed"
826 multifile_format_encode="$multifile_format_decode --sample-rate=44100 --bps=16 --channels=2"
827 run_flac --verify --force --silent --force-raw-format $multifile_format_encode noise.raw || die "ERROR generating FLAC file"
828 run_flac --decode --force --silent noise.flac || die "ERROR generating WAVE file"
829 run_flac --decode --force --silent noise.flac -o noise.aiff || die "ERROR generating AIFF file"
831 cp noise.wav file0.wav
832 cp noise.wav file1.wav
833 cp noise.wav file2.wav
835 cp noise.aiff file0.aiff
836 cp noise.aiff file1.aiff
837 cp noise.aiff file2.aiff
839 cp noise.raw file0.raw
840 cp noise.raw file1.raw
841 cp noise.raw file2.raw
842 # create authoritative sector-aligned files for comparison
843 file0_samples=`expr \( $total_noise_cdda_samples / 588 \) \* 588`
844 file0_remainder=`expr $total_noise_cdda_samples - $file0_samples`
845 file1_samples=`expr \( \( $file0_remainder + $total_noise_cdda_samples \) / 588 \) \* 588`
846 file1_remainder=`expr $file0_remainder + $total_noise_cdda_samples - $file1_samples`
847 file1_samples=`expr $file1_samples - $file0_remainder`
848 file2_samples=`expr \( \( $file1_remainder + $total_noise_cdda_samples \) / 588 \) \* 588`
849 file2_remainder=`expr $file1_remainder + $total_noise_cdda_samples - $file2_samples`
850 file2_samples=`expr $file2_samples - $file1_remainder`
851 if [ $file2_remainder != '0' ] ; then
852 file2_samples=`expr $file2_samples + $file2_remainder`
853 file2_remainder=`expr 588 - $file2_remainder`
856 dd if=file0.raw ibs=4 count=$file0_samples of=file0s.raw 2>/dev/null || $dddie
857 dd if=file0.raw ibs=4 count=$file0_remainder of=file1s.raw skip=$file0_samples 2>/dev/null || $dddie
858 dd if=file1.raw ibs=4 count=$file1_samples of=z.raw 2>/dev/null || $dddie
859 cat z.raw >> file1s.raw || die "ERROR: cat-ing sector-aligned files"
860 dd if=file1.raw ibs=4 count=$file1_remainder of=file2s.raw skip=$file1_samples 2>/dev/null || $dddie
861 dd if=file2.raw ibs=4 count=$file2_samples of=z.raw 2>/dev/null || $dddie
862 cat z.raw >> file2s.raw || die "ERROR: cat-ing sector-aligned files"
863 dd if=/dev/zero ibs=4 count=$file2_remainder of=z.raw 2>/dev/null || $dddie
864 cat z.raw >> file2s.raw || die "ERROR: cat-ing sector-aligned files"
867 convert_to_wav file0s "$multifile_format_encode --force" "--silent --force --decode" || die "ERROR creating authoritative sector-aligned WAVE"
868 convert_to_wav file1s "$multifile_format_encode --force" "--silent --force --decode" || die "ERROR creating authoritative sector-aligned WAVE"
869 convert_to_wav file2s "$multifile_format_encode --force" "--silent --force --decode" || die "ERROR creating authoritative sector-aligned WAVE"
871 convert_to_aiff file0s "$multifile_format_encode --force" "--silent --force --decode" || die "ERROR creating authoritative sector-aligned AIFF"
872 convert_to_aiff file1s "$multifile_format_encode --force" "--silent --force --decode" || die "ERROR creating authoritative sector-aligned AIFF"
873 convert_to_aiff file2s "$multifile_format_encode --force" "--silent --force --decode" || die "ERROR creating authoritative sector-aligned AIFF"
882 extra_encode_options=""
883 extra_decode_options=""
884 if [ $input_type = "raw" ] ; then
885 extra_encode_options="--force-raw-format $multifile_format_encode"
886 extra_decode_options="--force-raw-format $multifile_format_decode"
888 if [ $input_type = "aiff" ] ; then
889 extra_decode_options="--force-aiff-format"
893 if [ $streamtype = ogg ] ; then
895 encode_options="$encode_options --ogg"
900 if [ $sector_align = sector_align ] ; then
901 encode_options="$encode_options --sector-align"
904 run_flac --force $encode_options $extra_encode_options file0.$input_type file1.$input_type file2.$input_type || die "ERROR"
906 mv file$n.$suffix file${n}x.$suffix
908 run_flac --force --decode $extra_decode_options file0x.$suffix file1x.$suffix file2x.$suffix || die "ERROR"
909 if [ $sector_align != sector_align ] ; then
911 cmp file$n.$input_type file${n}x.$input_type || die "ERROR: file mismatch on file #$n"
915 cmp file${n}s.$input_type file${n}x.$input_type || die "ERROR: file mismatch on file #$n"
919 rm -f file${n}x.$suffix file${n}x.$input_type
923 for input_type in raw wav aiff ; do
924 echo "Testing multiple $input_type files without verify..."
925 test_multifile $input_type flac no_sector_align ""
927 echo "Testing multiple $input_type files with verify..."
928 test_multifile $input_type flac no_sector_align "--verify"
930 echo "Testing multiple $input_type files with --sector-align, without verify..."
931 test_multifile $input_type flac sector_align ""
933 echo "Testing multiple $input_type files with --sector-align, with verify..."
934 test_multifile $input_type flac sector_align "--verify"
936 if [ $has_ogg = "yes" ] ; then
937 echo "Testing multiple $input_type files with --ogg, without verify..."
938 test_multifile $input_type ogg no_sector_align ""
940 echo "Testing multiple $input_type files with --ogg, with verify..."
941 test_multifile $input_type ogg no_sector_align "--verify"
943 echo "Testing multiple $input_type files with --ogg and --sector-align, without verify..."
944 test_multifile $input_type ogg sector_align ""
946 echo "Testing multiple $input_type files with --ogg and --sector-align, with verify..."
947 test_multifile $input_type ogg sector_align "--verify"
949 echo "Testing multiple $input_type files with --ogg and --serial-number, with verify..."
950 test_multifile $input_type ogg no_sector_align "--serial-number=321 --verify"