Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # FLAC - Free Lossless Audio Codec |
Josh Coalson | 9564390 | 2004-01-17 04:14:43 +0000 | [diff] [blame^] | 4 | # Copyright (C) 2001,2002,2003,2004 Josh Coalson |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 5 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 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 |
| 13 | # distributed. |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 14 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 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 |
| 18 | # distribution. |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 19 | |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 20 | die () |
| 21 | { |
| 22 | echo $* 1>&2 |
| 23 | exit 1 |
| 24 | } |
| 25 | |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 26 | LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH |
| 27 | export LD_LIBRARY_PATH |
| 28 | PATH=../src/flac:../src/test_streams:../obj/release/bin:../obj/debug/bin:$PATH |
| 29 | |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 30 | flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 31 | |
| 32 | run_flac () |
| 33 | { |
Josh Coalson | ecf57b7 | 2003-01-14 09:00:25 +0000 | [diff] [blame] | 34 | if [ x"$FLAC__VALGRIND" = xyes ] ; then |
Josh Coalson | 80936c5 | 2002-12-30 23:31:47 +0000 | [diff] [blame] | 35 | valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_flac.valgrind.log |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 36 | else |
| 37 | flac $* |
| 38 | fi |
| 39 | } |
| 40 | |
| 41 | echo "Checking for --ogg support in flac..." |
| 42 | 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 |
| 43 | has_ogg=yes; |
| 44 | echo "flac --ogg works" |
| 45 | else |
| 46 | has_ogg=no; |
| 47 | echo "flac --ogg doesn't work" |
| 48 | fi |
| 49 | |
Josh Coalson | 5126bb0 | 2002-12-17 08:15:48 +0000 | [diff] [blame] | 50 | |
| 51 | echo "Generating streams..." |
| 52 | if [ ! -f wacky1.wav ] ; then |
| 53 | test_streams || die "ERROR during test_streams" |
| 54 | fi |
| 55 | |
| 56 | ############################################################################ |
| 57 | # basic 'round-trip' tests of various kinds of streams |
| 58 | ############################################################################ |
| 59 | |
| 60 | rt_test_raw () |
| 61 | { |
| 62 | f="$1" |
| 63 | channels=`echo $f | awk -F- '{print $2}'` |
| 64 | bytes_per_sample=`echo $f | awk -F- '{print $3}'` |
| 65 | bps=`expr $bytes_per_sample '*' 8` |
| 66 | echo -n "round-trip test ($f) encode... " |
| 67 | run_flac --silent --verify --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $f -o rt.flac || die "ERROR" |
| 68 | echo -n "decode... " |
| 69 | run_flac --silent --decode --force-raw-format --endian=little --sign=signed -o rt.raw rt.flac || die "ERROR" |
| 70 | echo -n "compare... " |
| 71 | cmp $f rt.raw || die "ERROR: file mismatch" |
| 72 | echo "OK" |
| 73 | rm -f rt.flac rt.raw |
| 74 | } |
| 75 | |
| 76 | rt_test_wav () |
| 77 | { |
| 78 | f="$1" |
| 79 | echo -n "round-trip test ($f) encode... " |
| 80 | run_flac --silent --verify $f -o rt.flac || die "ERROR" |
| 81 | echo -n "decode... " |
| 82 | run_flac --silent --decode -o rt.wav rt.flac || die "ERROR" |
| 83 | echo -n "compare... " |
| 84 | cmp $f rt.wav || die "ERROR: file mismatch" |
| 85 | echo "OK" |
| 86 | rm -f rt.flac rt.wav |
| 87 | } |
| 88 | |
| 89 | rt_test_aiff () |
| 90 | { |
| 91 | f="$1" |
| 92 | echo -n "round-trip test ($f) encode... " |
| 93 | run_flac --silent --verify $f -o rt.flac || die "ERROR" |
| 94 | echo -n "decode... " |
| 95 | run_flac --silent --decode -o rt.aiff rt.flac || die "ERROR" |
| 96 | echo -n "compare... " |
| 97 | cmp $f rt.aiff || die "ERROR: file mismatch" |
| 98 | echo "OK" |
| 99 | rm -f rt.flac rt.aiff |
| 100 | } |
| 101 | |
| 102 | for f in rt-*.raw ; do |
| 103 | rt_test_raw $f |
| 104 | done |
| 105 | for f in rt-*.wav ; do |
| 106 | rt_test_wav $f |
| 107 | done |
| 108 | for f in rt-*.aiff ; do |
| 109 | rt_test_aiff $f |
| 110 | done |
| 111 | |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 112 | ############################################################################ |
| 113 | # test --skip and --until |
| 114 | ############################################################################ |
| 115 | |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 116 | # |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 117 | # first make some chopped-up raw files |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 118 | # |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 119 | echo "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMN" > master.raw |
| 120 | dddie="die ERROR: creating files for --skip/--until tests" |
| 121 | dd if=master.raw ibs=1 count=50 of=50c.raw 2>/dev/null || $dddie |
| 122 | dd if=master.raw ibs=1 skip=10 count=40 of=50c.skip10.raw 2>/dev/null || $dddie |
| 123 | dd if=master.raw ibs=1 skip=11 count=39 of=50c.skip11.raw 2>/dev/null || $dddie |
| 124 | dd if=master.raw ibs=1 count=40 of=50c.until40.raw 2>/dev/null || $dddie |
| 125 | dd if=master.raw ibs=1 count=39 of=50c.until39.raw 2>/dev/null || $dddie |
| 126 | dd if=master.raw ibs=1 skip=10 count=30 of=50c.skip10.until40.raw 2>/dev/null || $dddie |
| 127 | dd if=master.raw ibs=1 skip=10 count=29 of=50c.skip10.until39.raw 2>/dev/null || $dddie |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 128 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 129 | wav_eopt="--silent --verify --lax" |
| 130 | wav_dopt="--silent --decode" |
| 131 | |
| 132 | raw_eopt="$wav_eopt --force-raw-format --endian=big --sign=signed --sample-rate=10 --bps=8 --channels=1" |
| 133 | raw_dopt="$wav_dopt --force-raw-format --endian=big --sign=signed" |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 134 | |
| 135 | # |
Josh Coalson | 5126bb0 | 2002-12-17 08:15:48 +0000 | [diff] [blame] | 136 | # convert them to WAVE and AIFF files |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 137 | # |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 138 | convert_to_wav () |
| 139 | { |
| 140 | run_flac $raw_eopt $1.raw || die "ERROR converting $1.raw to WAVE" |
| 141 | run_flac $wav_dopt $1.flac || die "ERROR converting $1.raw to WAVE" |
| 142 | } |
| 143 | convert_to_wav 50c |
| 144 | convert_to_wav 50c.skip10 |
| 145 | convert_to_wav 50c.skip11 |
| 146 | convert_to_wav 50c.until40 |
| 147 | convert_to_wav 50c.until39 |
| 148 | convert_to_wav 50c.skip10.until40 |
| 149 | convert_to_wav 50c.skip10.until39 |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 150 | |
Josh Coalson | 5126bb0 | 2002-12-17 08:15:48 +0000 | [diff] [blame] | 151 | convert_to_aiff () |
| 152 | { |
| 153 | run_flac $raw_eopt $1.raw || die "ERROR converting $1.raw to AIFF" |
| 154 | run_flac $wav_dopt $1.flac -o $1.aiff || die "ERROR converting $1.raw to AIFF" |
| 155 | } |
| 156 | convert_to_aiff 50c |
| 157 | convert_to_aiff 50c.skip10 |
| 158 | convert_to_aiff 50c.skip11 |
| 159 | convert_to_aiff 50c.until40 |
| 160 | convert_to_aiff 50c.until39 |
| 161 | convert_to_aiff 50c.skip10.until40 |
| 162 | convert_to_aiff 50c.skip10.until39 |
| 163 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 164 | test_skip_until () |
| 165 | { |
| 166 | fmt=$1 |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 167 | |
Josh Coalson | 5126bb0 | 2002-12-17 08:15:48 +0000 | [diff] [blame] | 168 | [ $fmt = wav ] || [ $fmt = aiff ] || [ $fmt = raw ] || die "ERROR: internal error, bad format '$fmt'" |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 169 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 170 | if [ $fmt = raw ] ; then |
| 171 | eopt="$raw_eopt" |
| 172 | dopt="$raw_dopt" |
| 173 | else |
| 174 | eopt="$wav_eopt" |
| 175 | dopt="$wav_dopt" |
| 176 | fi |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 177 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 178 | # |
| 179 | # test --skip when encoding |
| 180 | # |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 181 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 182 | echo -n "testing --skip=# (encode) ($fmt)... " |
| 183 | run_flac $eopt --skip=10 -o z50c.skip10.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 184 | run_flac $dopt -o z50c.skip10.$fmt z50c.skip10.flac || die "ERROR decoding FLAC file ($fmt)" |
| 185 | cmp 50c.skip10.$fmt z50c.skip10.$fmt || die "ERROR: file mismatch for --skip=10 (encode) ($fmt)" |
| 186 | rm -f z50c.skip10.flac z50c.skip10.$fmt |
| 187 | echo OK |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 188 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 189 | echo -n "testing --skip=mm:ss (encode) ($fmt)... " |
| 190 | run_flac $eopt --skip=0:01 -o z50c.skip0:01.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 191 | run_flac $dopt -o z50c.skip0:01.$fmt z50c.skip0:01.flac || die "ERROR decoding FLAC file ($fmt)" |
| 192 | cmp 50c.skip10.$fmt z50c.skip0:01.$fmt || die "ERROR: file mismatch for --skip=0:01 (encode) ($fmt)" |
| 193 | rm -f z50c.skip0:01.flac z50c.skip0:01.$fmt |
| 194 | echo OK |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 195 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 196 | echo -n "testing --skip=mm:ss.sss (encode) ($fmt)... " |
| 197 | run_flac $eopt --skip=0:01.1001 -o z50c.skip0:01.1001.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 198 | run_flac $dopt -o z50c.skip0:01.1001.$fmt z50c.skip0:01.1001.flac || die "ERROR decoding FLAC file ($fmt)" |
| 199 | cmp 50c.skip11.$fmt z50c.skip0:01.1001.$fmt || die "ERROR: file mismatch for --skip=0:01.1001 (encode) ($fmt)" |
| 200 | rm -f z50c.skip0:01.1001.flac z50c.skip0:01.1001.$fmt |
| 201 | echo OK |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 202 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 203 | # |
| 204 | # test --skip when decoding |
| 205 | # |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 206 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 207 | echo -n "testing --skip=# (decode) ($fmt)... " |
| 208 | run_flac $eopt -o z50c.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 209 | run_flac $dopt --skip=10 -o z50c.skip10.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 210 | cmp 50c.skip10.$fmt z50c.skip10.$fmt || die "ERROR: file mismatch for --skip=10 (decode) ($fmt)" |
| 211 | rm -f z50c.skip10.$fmt |
| 212 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 213 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 214 | echo -n "testing --skip=mm:ss (decode) ($fmt)... " |
| 215 | run_flac $dopt --skip=0:01 -o z50c.skip0:01.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 216 | cmp 50c.skip10.$fmt z50c.skip0:01.$fmt || die "ERROR: file mismatch for --skip=0:01 (decode) ($fmt)" |
| 217 | rm -f z50c.skip0:01.$fmt |
| 218 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 219 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 220 | echo -n "testing --skip=mm:ss.sss (decode) ($fmt)... " |
| 221 | run_flac $dopt --skip=0:01.1001 -o z50c.skip0:01.1001.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 222 | cmp 50c.skip11.$fmt z50c.skip0:01.1001.$fmt || die "ERROR: file mismatch for --skip=0:01.1001 (decode) ($fmt)" |
| 223 | rm -f z50c.skip0:01.1001.$fmt |
| 224 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 225 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 226 | rm -f z50c.flac |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 227 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 228 | # |
| 229 | # test --until when encoding |
| 230 | # |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 231 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 232 | echo -n "testing --until=# (encode) ($fmt)... " |
| 233 | run_flac $eopt --until=40 -o z50c.until40.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 234 | run_flac $dopt -o z50c.until40.$fmt z50c.until40.flac || die "ERROR decoding FLAC file ($fmt)" |
| 235 | cmp 50c.until40.$fmt z50c.until40.$fmt || die "ERROR: file mismatch for --until=40 (encode) ($fmt)" |
| 236 | rm -f z50c.until40.flac z50c.until40.$fmt |
| 237 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 238 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 239 | echo -n "testing --until=mm:ss (encode) ($fmt)... " |
| 240 | run_flac $eopt --until=0:04 -o z50c.until0:04.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 241 | run_flac $dopt -o z50c.until0:04.$fmt z50c.until0:04.flac || die "ERROR decoding FLAC file ($fmt)" |
| 242 | cmp 50c.until40.$fmt z50c.until0:04.$fmt || die "ERROR: file mismatch for --until=0:04 (encode) ($fmt)" |
| 243 | rm -f z50c.until0:04.flac z50c.until0:04.$fmt |
| 244 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 245 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 246 | echo -n "testing --until=mm:ss.sss (encode) ($fmt)... " |
| 247 | run_flac $eopt --until=0:03.9001 -o z50c.until0:03.9001.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 248 | run_flac $dopt -o z50c.until0:03.9001.$fmt z50c.until0:03.9001.flac || die "ERROR decoding FLAC file ($fmt)" |
| 249 | cmp 50c.until39.$fmt z50c.until0:03.9001.$fmt || die "ERROR: file mismatch for --until=0:03.9001 (encode) ($fmt)" |
| 250 | rm -f z50c.until0:03.9001.flac z50c.until0:03.9001.$fmt |
| 251 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 252 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 253 | echo -n "testing --until=-# (encode) ($fmt)... " |
| 254 | run_flac $eopt --until=-10 -o z50c.until-10.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 255 | run_flac $dopt -o z50c.until-10.$fmt z50c.until-10.flac || die "ERROR decoding FLAC file ($fmt)" |
| 256 | cmp 50c.until40.$fmt z50c.until-10.$fmt || die "ERROR: file mismatch for --until=-10 (encode) ($fmt)" |
| 257 | rm -f z50c.until-10.flac z50c.until-10.$fmt |
| 258 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 259 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 260 | echo -n "testing --until=-mm:ss (encode) ($fmt)... " |
| 261 | run_flac $eopt --until=-0:01 -o z50c.until-0:01.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 262 | run_flac $dopt -o z50c.until-0:01.$fmt z50c.until-0:01.flac || die "ERROR decoding FLAC file ($fmt)" |
| 263 | cmp 50c.until40.$fmt z50c.until-0:01.$fmt || die "ERROR: file mismatch for --until=-0:01 (encode) ($fmt)" |
| 264 | rm -f z50c.until-0:01.flac z50c.until-0:01.$fmt |
| 265 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 266 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 267 | echo -n "testing --until=-mm:ss.sss (encode) ($fmt)... " |
| 268 | run_flac $eopt --until=-0:01.1001 -o z50c.until-0:01.1001.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 269 | run_flac $dopt -o z50c.until-0:01.1001.$fmt z50c.until-0:01.1001.flac || die "ERROR decoding FLAC file ($fmt)" |
| 270 | cmp 50c.until39.$fmt z50c.until-0:01.1001.$fmt || die "ERROR: file mismatch for --until=-0:01.1001 (encode) ($fmt)" |
| 271 | rm -f z50c.until-0:01.1001.flac z50c.until-0:01.1001.$fmt |
| 272 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 273 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 274 | # |
| 275 | # test --until when decoding |
| 276 | # |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 277 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 278 | run_flac $eopt -o z50c.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 279 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 280 | echo -n "testing --until=# (decode) ($fmt)... " |
| 281 | run_flac $dopt --until=40 -o z50c.until40.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 282 | cmp 50c.until40.$fmt z50c.until40.$fmt || die "ERROR: file mismatch for --until=40 (decode) ($fmt)" |
| 283 | rm -f z50c.until40.$fmt |
| 284 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 285 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 286 | echo -n "testing --until=mm:ss (decode) ($fmt)... " |
| 287 | run_flac $dopt --until=0:04 -o z50c.until0:04.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 288 | cmp 50c.until40.$fmt z50c.until0:04.$fmt || die "ERROR: file mismatch for --until=0:04 (decode) ($fmt)" |
| 289 | rm -f z50c.until0:04.$fmt |
| 290 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 291 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 292 | echo -n "testing --until=mm:ss.sss (decode) ($fmt)... " |
| 293 | run_flac $dopt --until=0:03.9001 -o z50c.until0:03.9001.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 294 | cmp 50c.until39.$fmt z50c.until0:03.9001.$fmt || die "ERROR: file mismatch for --until=0:03.9001 (decode) ($fmt)" |
| 295 | rm -f z50c.until0:03.9001.$fmt |
| 296 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 297 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 298 | echo -n "testing --until=-# (decode) ($fmt)... " |
| 299 | run_flac $dopt --until=-10 -o z50c.until-10.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 300 | cmp 50c.until40.$fmt z50c.until-10.$fmt || die "ERROR: file mismatch for --until=-10 (decode) ($fmt)" |
| 301 | rm -f z50c.until-10.$fmt |
| 302 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 303 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 304 | echo -n "testing --until=-mm:ss (decode) ($fmt)... " |
| 305 | run_flac $dopt --until=-0:01 -o z50c.until-0:01.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 306 | cmp 50c.until40.$fmt z50c.until-0:01.$fmt || die "ERROR: file mismatch for --until=-0:01 (decode) ($fmt)" |
| 307 | rm -f z50c.until-0:01.$fmt |
| 308 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 309 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 310 | echo -n "testing --until=-mm:ss.sss (decode) ($fmt)... " |
| 311 | run_flac $dopt --until=-0:01.1001 -o z50c.until-0:01.1001.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 312 | cmp 50c.until39.$fmt z50c.until-0:01.1001.$fmt || die "ERROR: file mismatch for --until=-0:01.1001 (decode) ($fmt)" |
| 313 | rm -f z50c.until-0:01.1001.$fmt |
| 314 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 315 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 316 | rm -f z50c.flac |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 317 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 318 | # |
| 319 | # test --skip and --until when encoding |
| 320 | # |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 321 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 322 | echo -n "testing --skip=10 --until=# (encode) ($fmt)... " |
| 323 | run_flac $eopt --skip=10 --until=40 -o z50c.skip10.until40.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 324 | run_flac $dopt -o z50c.skip10.until40.$fmt z50c.skip10.until40.flac || die "ERROR decoding FLAC file ($fmt)" |
| 325 | cmp 50c.skip10.until40.$fmt z50c.skip10.until40.$fmt || die "ERROR: file mismatch for --skip=10 --until=40 (encode) ($fmt)" |
| 326 | rm -f z50c.skip10.until40.flac z50c.skip10.until40.$fmt |
| 327 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 328 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 329 | echo -n "testing --skip=10 --until=mm:ss (encode) ($fmt)... " |
| 330 | run_flac $eopt --skip=10 --until=0:04 -o z50c.skip10.until0:04.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 331 | run_flac $dopt -o z50c.skip10.until0:04.$fmt z50c.skip10.until0:04.flac || die "ERROR decoding FLAC file ($fmt)" |
| 332 | cmp 50c.skip10.until40.$fmt z50c.skip10.until0:04.$fmt || die "ERROR: file mismatch for --skip=10 --until=0:04 (encode) ($fmt)" |
| 333 | rm -f z50c.skip10.until0:04.flac z50c.skip10.until0:04.$fmt |
| 334 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 335 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 336 | echo -n "testing --skip=10 --until=mm:ss.sss (encode) ($fmt)... " |
| 337 | run_flac $eopt --skip=10 --until=0:03.9001 -o z50c.skip10.until0:03.9001.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 338 | run_flac $dopt -o z50c.skip10.until0:03.9001.$fmt z50c.skip10.until0:03.9001.flac || die "ERROR decoding FLAC file ($fmt)" |
| 339 | cmp 50c.skip10.until39.$fmt z50c.skip10.until0:03.9001.$fmt || die "ERROR: file mismatch for --skip=10 --until=0:03.9001 (encode) ($fmt)" |
| 340 | rm -f z50c.skip10.until0:03.9001.flac z50c.skip10.until0:03.9001.$fmt |
| 341 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 342 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 343 | echo -n "testing --skip=10 --until=+# (encode) ($fmt)... " |
| 344 | run_flac $eopt --skip=10 --until=+30 -o z50c.skip10.until+30.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 345 | run_flac $dopt -o z50c.skip10.until+30.$fmt z50c.skip10.until+30.flac || die "ERROR decoding FLAC file ($fmt)" |
| 346 | cmp 50c.skip10.until40.$fmt z50c.skip10.until+30.$fmt || die "ERROR: file mismatch for --skip=10 --until=+30 (encode) ($fmt)" |
| 347 | rm -f z50c.skip10.until+30.flac z50c.skip10.until+30.$fmt |
| 348 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 349 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 350 | echo -n "testing --skip=10 --until=+mm:ss (encode) ($fmt)... " |
| 351 | run_flac $eopt --skip=10 --until=+0:03 -o z50c.skip10.until+0:03.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 352 | run_flac $dopt -o z50c.skip10.until+0:03.$fmt z50c.skip10.until+0:03.flac || die "ERROR decoding FLAC file ($fmt)" |
| 353 | cmp 50c.skip10.until40.$fmt z50c.skip10.until+0:03.$fmt || die "ERROR: file mismatch for --skip=10 --until=+0:03 (encode) ($fmt)" |
| 354 | rm -f z50c.skip10.until+0:03.flac z50c.skip10.until+0:03.$fmt |
| 355 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 356 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 357 | echo -n "testing --skip=10 --until=+mm:ss.sss (encode) ($fmt)... " |
| 358 | run_flac $eopt --skip=10 --until=+0:02.9001 -o z50c.skip10.until+0:02.9001.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 359 | run_flac $dopt -o z50c.skip10.until+0:02.9001.$fmt z50c.skip10.until+0:02.9001.flac || die "ERROR decoding FLAC file ($fmt)" |
| 360 | cmp 50c.skip10.until39.$fmt z50c.skip10.until+0:02.9001.$fmt || die "ERROR: file mismatch for --skip=10 --until=+0:02.9001 (encode) ($fmt)" |
| 361 | rm -f z50c.skip10.until+0:02.9001.flac z50c.skip10.until+0:02.9001.$fmt |
| 362 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 363 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 364 | echo -n "testing --skip=10 --until=-# (encode) ($fmt)... " |
| 365 | run_flac $eopt --skip=10 --until=-10 -o z50c.skip10.until-10.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 366 | run_flac $dopt -o z50c.skip10.until-10.$fmt z50c.skip10.until-10.flac || die "ERROR decoding FLAC file ($fmt)" |
| 367 | cmp 50c.skip10.until40.$fmt z50c.skip10.until-10.$fmt || die "ERROR: file mismatch for --skip=10 --until=-10 (encode) ($fmt)" |
| 368 | rm -f z50c.skip10.until-10.flac z50c.skip10.until-10.$fmt |
| 369 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 370 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 371 | echo -n "testing --skip=10 --until=-mm:ss (encode) ($fmt)... " |
| 372 | run_flac $eopt --skip=10 --until=-0:01 -o z50c.skip10.until-0:01.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 373 | run_flac $dopt -o z50c.skip10.until-0:01.$fmt z50c.skip10.until-0:01.flac || die "ERROR decoding FLAC file ($fmt)" |
| 374 | cmp 50c.skip10.until40.$fmt z50c.skip10.until-0:01.$fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01 (encode) ($fmt)" |
| 375 | rm -f z50c.skip10.until-0:01.flac z50c.skip10.until-0:01.$fmt |
| 376 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 377 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 378 | echo -n "testing --skip=10 --until=-mm:ss.sss (encode) ($fmt)... " |
| 379 | run_flac $eopt --skip=10 --until=-0:01.1001 -o z50c.skip10.until-0:01.1001.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
| 380 | run_flac $dopt -o z50c.skip10.until-0:01.1001.$fmt z50c.skip10.until-0:01.1001.flac || die "ERROR decoding FLAC file ($fmt)" |
| 381 | cmp 50c.skip10.until39.$fmt z50c.skip10.until-0:01.1001.$fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01.1001 (encode) ($fmt)" |
| 382 | rm -f z50c.skip10.until-0:01.1001.flac z50c.skip10.until-0:01.1001.$fmt |
| 383 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 384 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 385 | # |
| 386 | # test --skip and --until when decoding |
| 387 | # |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 388 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 389 | run_flac $eopt -o z50c.flac 50c.$fmt || die "ERROR generating FLAC file ($fmt)" |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 390 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 391 | echo -n "testing --skip=10 --until=# (decode) ($fmt)... " |
| 392 | run_flac $dopt --skip=10 --until=40 -o z50c.skip10.until40.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 393 | cmp 50c.skip10.until40.$fmt z50c.skip10.until40.$fmt || die "ERROR: file mismatch for --skip=10 --until=40 (decode) ($fmt)" |
| 394 | rm -f z50c.skip10.until40.$fmt |
| 395 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 396 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 397 | echo -n "testing --skip=10 --until=mm:ss (decode) ($fmt)... " |
| 398 | run_flac $dopt --skip=10 --until=0:04 -o z50c.skip10.until0:04.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 399 | cmp 50c.skip10.until40.$fmt z50c.skip10.until0:04.$fmt || die "ERROR: file mismatch for --skip=10 --until=0:04 (decode) ($fmt)" |
| 400 | rm -f z50c.skip10.until0:04.$fmt |
| 401 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 402 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 403 | echo -n "testing --skip=10 --until=mm:ss.sss (decode) ($fmt)... " |
| 404 | run_flac $dopt --skip=10 --until=0:03.9001 -o z50c.skip10.until0:03.9001.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 405 | cmp 50c.skip10.until39.$fmt z50c.skip10.until0:03.9001.$fmt || die "ERROR: file mismatch for --skip=10 --until=0:03.9001 (decode) ($fmt)" |
| 406 | rm -f z50c.skip10.until0:03.9001.$fmt |
| 407 | echo OK |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 408 | |
Josh Coalson | 8232e29 | 2002-12-14 06:22:22 +0000 | [diff] [blame] | 409 | echo -n "testing --skip=10 --until=-# (decode) ($fmt)... " |
| 410 | run_flac $dopt --skip=10 --until=-10 -o z50c.skip10.until-10.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 411 | cmp 50c.skip10.until40.$fmt z50c.skip10.until-10.$fmt || die "ERROR: file mismatch for --skip=10 --until=-10 (decode) ($fmt)" |
| 412 | rm -f z50c.skip10.until-10.$fmt |
| 413 | echo OK |
| 414 | |
| 415 | echo -n "testing --skip=10 --until=-mm:ss (decode) ($fmt)... " |
| 416 | run_flac $dopt --skip=10 --until=-0:01 -o z50c.skip10.until-0:01.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 417 | cmp 50c.skip10.until40.$fmt z50c.skip10.until-0:01.$fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01 (decode) ($fmt)" |
| 418 | rm -f z50c.skip10.until-0:01.$fmt |
| 419 | echo OK |
| 420 | |
| 421 | echo -n "testing --skip=10 --until=-mm:ss.sss (decode) ($fmt)... " |
| 422 | run_flac $dopt --skip=10 --until=-0:01.1001 -o z50c.skip10.until-0:01.1001.$fmt z50c.flac || die "ERROR decoding FLAC file ($fmt)" |
| 423 | cmp 50c.skip10.until39.$fmt z50c.skip10.until-0:01.1001.$fmt || die "ERROR: file mismatch for --skip=10 --until=-0:01.1001 (decode) ($fmt)" |
| 424 | rm -f z50c.skip10.until-0:01.1001.$fmt |
| 425 | echo OK |
| 426 | |
| 427 | rm -f z50c.flac |
| 428 | } |
| 429 | |
| 430 | test_skip_until raw |
| 431 | test_skip_until wav |
Josh Coalson | 5126bb0 | 2002-12-17 08:15:48 +0000 | [diff] [blame] | 432 | test_skip_until aiff |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 433 | |
Josh Coalson | 9238a14 | 2002-12-21 03:29:26 +0000 | [diff] [blame] | 434 | |
| 435 | ############################################################################ |
| 436 | # test 'fixup' code that happens when a FLAC file with total_samples == 0 |
| 437 | # in the STREAMINFO block is converted to WAVE or AIFF, requiring the |
| 438 | # decoder go back and fix up the chunk headers |
| 439 | ############################################################################ |
| 440 | |
| 441 | echo -n "WAVE fixup test... " |
| 442 | echo -n "prepare... " |
| 443 | convert_to_wav noise || die "ERROR creating reference WAVE" |
| 444 | echo -n "encode... " |
| 445 | cat noise.raw | run_flac $raw_eopt - -c > fixup.flac || die "ERROR generating FLAC file" |
| 446 | echo -n "decode... " |
| 447 | run_flac $wav_dopt fixup.flac -o fixup.wav || die "ERROR decoding FLAC file" |
| 448 | echo -n "compare... " |
| 449 | cmp noise.wav fixup.wav || die "ERROR: file mismatch" |
| 450 | echo OK |
| 451 | rm -f noise.wav fixup.wav fixup.flac |
| 452 | |
| 453 | echo -n "AIFF fixup test... " |
| 454 | echo -n "prepare... " |
| 455 | convert_to_aiff noise || die "ERROR creating reference AIFF" |
| 456 | echo -n "encode... " |
| 457 | cat noise.raw | run_flac $raw_eopt - -c > fixup.flac || die "ERROR generating FLAC file" |
| 458 | echo -n "decode... " |
| 459 | run_flac $wav_dopt fixup.flac -o fixup.aiff || die "ERROR decoding FLAC file" |
| 460 | echo -n "compare... " |
| 461 | cmp noise.aiff fixup.aiff || die "ERROR: file mismatch" |
| 462 | echo OK |
| 463 | rm -f noise.aiff fixup.aiff fixup.flac |
| 464 | |
| 465 | |
| 466 | ############################################################################ |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 467 | # multi-file tests |
Josh Coalson | 9238a14 | 2002-12-21 03:29:26 +0000 | [diff] [blame] | 468 | ############################################################################ |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 469 | |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 470 | echo "Generating multiple input files from noise..." |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 471 | run_flac --verify --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 noise.raw || die "ERROR generating FLAC file" |
| 472 | run_flac --decode --silent noise.flac || die "ERROR generating WAVE file" |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 473 | rm -f noise.flac |
| 474 | mv noise.wav file0.wav |
| 475 | cp file0.wav file1.wav |
| 476 | cp file1.wav file2.wav |
| 477 | |
| 478 | test_multifile () |
| 479 | { |
| 480 | streamtype=$1 |
| 481 | sector_align=$2 |
| 482 | encode_options="$3" |
| 483 | |
| 484 | if [ $streamtype = ogg ] ; then |
| 485 | suffix=ogg |
| 486 | encode_options="$encode_options --ogg" |
| 487 | else |
| 488 | suffix=flac |
| 489 | fi |
| 490 | |
| 491 | if [ $sector_align = sector_align ] ; then |
| 492 | encode_options="$encode_options --sector-align" |
| 493 | fi |
| 494 | |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 495 | run_flac $encode_options file0.wav file1.wav file2.wav || die "ERROR" |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 496 | for n in 0 1 2 ; do |
| 497 | mv file$n.$suffix file${n}x.$suffix |
| 498 | done |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 499 | run_flac --decode file0x.$suffix file1x.$suffix file2x.$suffix || die "ERROR" |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 500 | if [ $sector_align != sector_align ] ; then |
| 501 | for n in 0 1 2 ; do |
Josh Coalson | 8fac5d6 | 2002-12-12 03:57:47 +0000 | [diff] [blame] | 502 | cmp file$n.wav file${n}x.wav || die "ERROR: file mismatch on file #$n" |
Josh Coalson | 463d0f8 | 2002-12-10 06:41:27 +0000 | [diff] [blame] | 503 | done |
| 504 | fi |
| 505 | for n in 0 1 2 ; do |
| 506 | rm -f file${n}x.$suffix file${n}x.wav |
| 507 | done |
| 508 | } |
| 509 | |
| 510 | echo "Testing multiple files without verify..." |
| 511 | test_multifile flac no_sector_align "" |
| 512 | |
| 513 | echo "Testing multiple files with verify..." |
| 514 | test_multifile flac no_sector_align "--verify" |
| 515 | |
| 516 | echo "Testing multiple files with --sector-align, without verify..." |
| 517 | test_multifile flac sector_align "" |
| 518 | |
| 519 | echo "Testing multiple files with --sector-align, with verify..." |
| 520 | test_multifile flac sector_align "--verify" |
| 521 | |
| 522 | if [ $has_ogg = "yes" ] ; then |
| 523 | echo "Testing multiple files with --ogg, without verify..." |
| 524 | test_multifile ogg no_sector_align "" |
| 525 | |
| 526 | echo "Testing multiple files with --ogg, with verify..." |
| 527 | test_multifile ogg no_sector_align "--verify" |
| 528 | |
| 529 | echo "Testing multiple files with --ogg and --sector-align, without verify..." |
| 530 | test_multifile ogg sector_align "" |
| 531 | |
| 532 | echo "Testing multiple files with --ogg and --sector-align, with verify..." |
| 533 | test_multifile sector_align ogg "--verify" |
| 534 | |
| 535 | echo "Testing multiple files with --ogg and --serial-number, with verify..." |
| 536 | test_multifile ogg no_sector_align "--serial-number=321 --verify" |
| 537 | fi |