switch metaflac test over to comparing output against "golden" files
This commit is contained in:
parent
08c719a556
commit
ff151cc781
67
test/metaflac-test-files/Makefile.am
Normal file
67
test/metaflac-test-files/Makefile.am
Normal file
@ -0,0 +1,67 @@
|
||||
# FLAC - Free Lossless Audio Codec
|
||||
# Copyright (C) 2006 Josh Coalson
|
||||
#
|
||||
# This file is part the FLAC project. FLAC is comprised of several
|
||||
# components distributed under difference licenses. The codec libraries
|
||||
# are distributed under Xiph.Org's BSD-like license (see the file
|
||||
# COPYING.Xiph in this distribution). All other programs, libraries, and
|
||||
# plugins are distributed under the GPL (see COPYING.GPL). The documentation
|
||||
# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
|
||||
# FLAC distribution contains at the top the terms under which it may be
|
||||
# distributed.
|
||||
#
|
||||
# Since this particular file is relevant to all components of FLAC,
|
||||
# it may be distributed under the Xiph.Org license, which is the least
|
||||
# restrictive of those mentioned above. See the file COPYING.Xiph in this
|
||||
# distribution.
|
||||
|
||||
EXTRA_DIST = \
|
||||
case00-expect.meta \
|
||||
case01-expect.meta \
|
||||
case02-expect.meta \
|
||||
case03-expect.meta \
|
||||
case04-expect.meta \
|
||||
case05-expect.meta \
|
||||
case06-expect.meta \
|
||||
case07-expect.meta \
|
||||
case08-expect.meta \
|
||||
case09-expect.meta \
|
||||
case10-expect.meta \
|
||||
case11-expect.meta \
|
||||
case12-expect.meta \
|
||||
case13-expect.meta \
|
||||
case14-expect.meta \
|
||||
case15-expect.meta \
|
||||
case16-expect.meta \
|
||||
case17-expect.meta \
|
||||
case18-expect.meta \
|
||||
case19-expect.meta \
|
||||
case20-expect.meta \
|
||||
case21-expect.meta \
|
||||
case22-expect.meta \
|
||||
case23-expect.meta \
|
||||
case24-expect.meta \
|
||||
case25-expect.meta \
|
||||
case26-expect.meta \
|
||||
case27-expect.meta \
|
||||
case28-expect.meta \
|
||||
case29-expect.meta \
|
||||
case30-expect.meta \
|
||||
case31-expect.meta \
|
||||
case32-expect.meta \
|
||||
case33-expect.meta \
|
||||
case34-expect.meta \
|
||||
case35-expect.meta \
|
||||
case36-expect.meta \
|
||||
case37-expect.meta \
|
||||
case38-expect.meta \
|
||||
case39-expect.meta \
|
||||
case40-expect.meta \
|
||||
case41-expect.meta \
|
||||
case42-expect.meta \
|
||||
case43-expect.meta \
|
||||
case44-expect.meta \
|
||||
case45-expect.meta
|
||||
|
||||
CLEANFILES = \
|
||||
$(wildcard out.*)
|
24
test/metaflac-test-files/case00-expect.meta
Normal file
24
test/metaflac-test-files/case00-expect.meta
Normal file
@ -0,0 +1,24 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 40
|
||||
comments: 0
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 4096
|
9
test/metaflac-test-files/case01-expect.meta
Normal file
9
test/metaflac-test-files/case01-expect.meta
Normal file
@ -0,0 +1,9 @@
|
||||
a042237c5493fdb9656b94a83608d11a
|
||||
1152
|
||||
1152
|
||||
10
|
||||
10
|
||||
8000
|
||||
1
|
||||
8
|
||||
80000
|
28
test/metaflac-test-files/case02-expect.meta
Normal file
28
test/metaflac-test-files/case02-expect.meta
Normal file
@ -0,0 +1,28 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 40
|
||||
comments: 0
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: false
|
||||
length: 4096
|
||||
METADATA block #4
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 12345
|
25
test/metaflac-test-files/case03-expect.meta
Normal file
25
test/metaflac-test-files/case03-expect.meta
Normal file
@ -0,0 +1,25 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 93
|
||||
comments: 1
|
||||
comment[0]: ARTIST=The_artist_formerly_known_as_the_artist...
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16392
|
26
test/metaflac-test-files/case04-expect.meta
Normal file
26
test/metaflac-test-files/case04-expect.meta
Normal file
@ -0,0 +1,26 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 117
|
||||
comments: 2
|
||||
comment[0]: ARTIST=The_artist_formerly_known_as_the_artist...
|
||||
comment[1]: ARTIST=Chuck_Woolery
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16368
|
27
test/metaflac-test-files/case05-expect.meta
Normal file
27
test/metaflac-test-files/case05-expect.meta
Normal file
@ -0,0 +1,27 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 132
|
||||
comments: 3
|
||||
comment[0]: ARTIST=The_artist_formerly_known_as_the_artist...
|
||||
comment[1]: ARTIST=Chuck_Woolery
|
||||
comment[2]: ARTIST=Vern
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16353
|
28
test/metaflac-test-files/case06-expect.meta
Normal file
28
test/metaflac-test-files/case06-expect.meta
Normal file
@ -0,0 +1,28 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 166
|
||||
comments: 4
|
||||
comment[0]: ARTIST=The_artist_formerly_known_as_the_artist...
|
||||
comment[1]: ARTIST=Chuck_Woolery
|
||||
comment[2]: ARTIST=Vern
|
||||
comment[3]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16319
|
4
test/metaflac-test-files/case07-expect.meta
Normal file
4
test/metaflac-test-files/case07-expect.meta
Normal file
@ -0,0 +1,4 @@
|
||||
reference libFLAC 1.1.3 20060805
|
||||
ARTIST=The_artist_formerly_known_as_the_artist...
|
||||
ARTIST=Chuck_Woolery
|
||||
ARTIST=Vern
|
27
test/metaflac-test-files/case08-expect.meta
Normal file
27
test/metaflac-test-files/case08-expect.meta
Normal file
@ -0,0 +1,27 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 113
|
||||
comments: 3
|
||||
comment[0]: ARTIST=Chuck_Woolery
|
||||
comment[1]: ARTIST=Vern
|
||||
comment[2]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16372
|
25
test/metaflac-test-files/case09-expect.meta
Normal file
25
test/metaflac-test-files/case09-expect.meta
Normal file
@ -0,0 +1,25 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16411
|
6
test/metaflac-test-files/case10-expect.meta
Normal file
6
test/metaflac-test-files/case10-expect.meta
Normal file
@ -0,0 +1,6 @@
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
9
test/metaflac-test-files/case11-expect.meta
Normal file
9
test/metaflac-test-files/case11-expect.meta
Normal file
@ -0,0 +1,9 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
12
test/metaflac-test-files/case12-expect.meta
Normal file
12
test/metaflac-test-files/case12-expect.meta
Normal file
@ -0,0 +1,12 @@
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
10
test/metaflac-test-files/case13-expect.meta
Normal file
10
test/metaflac-test-files/case13-expect.meta
Normal file
@ -0,0 +1,10 @@
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16411
|
13
test/metaflac-test-files/case14-expect.meta
Normal file
13
test/metaflac-test-files/case14-expect.meta
Normal file
@ -0,0 +1,13 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16411
|
16
test/metaflac-test-files/case15-expect.meta
Normal file
16
test/metaflac-test-files/case15-expect.meta
Normal file
@ -0,0 +1,16 @@
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 16411
|
33
test/metaflac-test-files/case16-expect.meta
Normal file
33
test/metaflac-test-files/case16-expect.meta
Normal file
@ -0,0 +1,33 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: false
|
||||
length: 16411
|
||||
METADATA block #4
|
||||
type: 1 (PADDING)
|
||||
is last: false
|
||||
length: 4321
|
||||
METADATA block #5
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 4321
|
25
test/metaflac-test-files/case17-expect.meta
Normal file
25
test/metaflac-test-files/case17-expect.meta
Normal file
@ -0,0 +1,25 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 25061
|
29
test/metaflac-test-files/case18-expect.meta
Normal file
29
test/metaflac-test-files/case18-expect.meta
Normal file
@ -0,0 +1,29 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: false
|
||||
length: 25061
|
||||
METADATA block #4
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 0
|
25
test/metaflac-test-files/case19-expect.meta
Normal file
25
test/metaflac-test-files/case19-expect.meta
Normal file
@ -0,0 +1,25 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 25065
|
29
test/metaflac-test-files/case20-expect.meta
Normal file
29
test/metaflac-test-files/case20-expect.meta
Normal file
@ -0,0 +1,29 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 74
|
||||
comments: 1
|
||||
comment[0]: TITLE=He_who_smelt_it_dealt_it
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: false
|
||||
length: 25065
|
||||
METADATA block #4
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 0
|
24
test/metaflac-test-files/case21-expect.meta
Normal file
24
test/metaflac-test-files/case21-expect.meta
Normal file
@ -0,0 +1,24 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 40
|
||||
comments: 0
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 25103
|
18
test/metaflac-test-files/case22-expect.meta
Normal file
18
test/metaflac-test-files/case22-expect.meta
Normal file
@ -0,0 +1,18 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 40
|
||||
comments: 0
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 25103
|
18
test/metaflac-test-files/case23-expect.meta
Normal file
18
test/metaflac-test-files/case23-expect.meta
Normal file
@ -0,0 +1,18 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 40
|
||||
comments: 0
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 25103
|
18
test/metaflac-test-files/case24-expect.meta
Normal file
18
test/metaflac-test-files/case24-expect.meta
Normal file
@ -0,0 +1,18 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 40
|
||||
comments: 0
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 25103
|
14
test/metaflac-test-files/case25-expect.meta
Normal file
14
test/metaflac-test-files/case25-expect.meta
Normal file
@ -0,0 +1,14 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: true
|
||||
length: 40
|
||||
comments: 0
|
22
test/metaflac-test-files/case26-expect.meta
Normal file
22
test/metaflac-test-files/case26-expect.meta
Normal file
@ -0,0 +1,22 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 40
|
||||
comments: 0
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: false
|
||||
length: 0
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 0
|
13
test/metaflac-test-files/case27-expect.meta
Normal file
13
test/metaflac-test-files/case27-expect.meta
Normal file
@ -0,0 +1,13 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 48
|
13
test/metaflac-test-files/case28-expect.meta
Normal file
13
test/metaflac-test-files/case28-expect.meta
Normal file
@ -0,0 +1,13 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 48
|
9
test/metaflac-test-files/case29-expect.meta
Normal file
9
test/metaflac-test-files/case29-expect.meta
Normal file
@ -0,0 +1,9 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: true
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
9
test/metaflac-test-files/case30-expect.meta
Normal file
9
test/metaflac-test-files/case30-expect.meta
Normal file
@ -0,0 +1,9 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: true
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
15
test/metaflac-test-files/case31-expect.meta
Normal file
15
test/metaflac-test-files/case31-expect.meta
Normal file
@ -0,0 +1,15 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: true
|
||||
length: 66
|
||||
comments: 1
|
||||
comment[0]: f=0123456789abcdefghij
|
15
test/metaflac-test-files/case32-expect.meta
Normal file
15
test/metaflac-test-files/case32-expect.meta
Normal file
@ -0,0 +1,15 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: true
|
||||
length: 65
|
||||
comments: 1
|
||||
comment[0]: f=0123456789abcdefghi
|
19
test/metaflac-test-files/case33-expect.meta
Normal file
19
test/metaflac-test-files/case33-expect.meta
Normal file
@ -0,0 +1,19 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 61
|
||||
comments: 1
|
||||
comment[0]: f=0123456789abcde
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 0
|
19
test/metaflac-test-files/case34-expect.meta
Normal file
19
test/metaflac-test-files/case34-expect.meta
Normal file
@ -0,0 +1,19 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 47
|
||||
comments: 1
|
||||
comment[0]: f=0
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 14
|
19
test/metaflac-test-files/case35-expect.meta
Normal file
19
test/metaflac-test-files/case35-expect.meta
Normal file
@ -0,0 +1,19 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 56
|
||||
comments: 1
|
||||
comment[0]: f=0123456789
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 5
|
15
test/metaflac-test-files/case36-expect.meta
Normal file
15
test/metaflac-test-files/case36-expect.meta
Normal file
@ -0,0 +1,15 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: true
|
||||
length: 65
|
||||
comments: 1
|
||||
comment[0]: f=0123456789abcdefghi
|
19
test/metaflac-test-files/case37-expect.meta
Normal file
19
test/metaflac-test-files/case37-expect.meta
Normal file
@ -0,0 +1,19 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 56
|
||||
comments: 1
|
||||
comment[0]: f=0123456789
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 5
|
19
test/metaflac-test-files/case38-expect.meta
Normal file
19
test/metaflac-test-files/case38-expect.meta
Normal file
@ -0,0 +1,19 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 66
|
||||
comments: 1
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 5
|
20
test/metaflac-test-files/case39-expect.meta
Normal file
20
test/metaflac-test-files/case39-expect.meta
Normal file
@ -0,0 +1,20 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 82
|
||||
comments: 2
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
comment[1]: TITLE=Tittle
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 5
|
22
test/metaflac-test-files/case40-expect.meta
Normal file
22
test/metaflac-test-files/case40-expect.meta
Normal file
@ -0,0 +1,22 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 117
|
||||
comments: 4
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
comment[1]: TITLE=Tittle
|
||||
comment[2]: artist=Fartist
|
||||
comment[3]: artist=artits
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 5
|
26
test/metaflac-test-files/case41-expect.meta
Normal file
26
test/metaflac-test-files/case41-expect.meta
Normal file
@ -0,0 +1,26 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 259
|
||||
comments: 8
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
comment[1]: TITLE=Tittle
|
||||
comment[2]: artist=Fartist
|
||||
comment[3]: artist=artits
|
||||
comment[4]: REPLAYGAIN_TRACK_PEAK=0.00000000
|
||||
comment[5]: REPLAYGAIN_TRACK_GAIN=+64.82 dB
|
||||
comment[6]: REPLAYGAIN_ALBUM_PEAK=0.00000000
|
||||
comment[7]: REPLAYGAIN_ALBUM_GAIN=+64.82 dB
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 5
|
22
test/metaflac-test-files/case42-expect.meta
Normal file
22
test/metaflac-test-files/case42-expect.meta
Normal file
@ -0,0 +1,22 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 117
|
||||
comments: 4
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
comment[1]: TITLE=Tittle
|
||||
comment[2]: artist=Fartist
|
||||
comment[3]: artist=artits
|
||||
METADATA block #2
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 147
|
49
test/metaflac-test-files/case43-expect.meta
Normal file
49
test/metaflac-test-files/case43-expect.meta
Normal file
@ -0,0 +1,49 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 117
|
||||
comments: 4
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
comment[1]: TITLE=Tittle
|
||||
comment[2]: artist=Fartist
|
||||
comment[3]: artist=artits
|
||||
METADATA block #3
|
||||
type: 5 (CUESHEET)
|
||||
is last: false
|
||||
length: 480
|
||||
media catalog number: 1234567890123
|
||||
lead-in: 0
|
||||
is CD: false
|
||||
number of tracks: 2
|
||||
track[0]
|
||||
offset: 0
|
||||
number: 1
|
||||
ISRC:
|
||||
type: AUDIO
|
||||
pre-emphasis: false
|
||||
number of index points: 1
|
||||
index[0]
|
||||
offset: 0
|
||||
number: 1
|
||||
track[1]
|
||||
offset: 80000
|
||||
number: 1 (LEAD-OUT)
|
||||
METADATA block #4
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 147
|
28
test/metaflac-test-files/case44-expect.meta
Normal file
28
test/metaflac-test-files/case44-expect.meta
Normal file
@ -0,0 +1,28 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 117
|
||||
comments: 4
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
comment[1]: TITLE=Tittle
|
||||
comment[2]: artist=Fartist
|
||||
comment[3]: artist=artits
|
||||
METADATA block #3
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 631
|
49
test/metaflac-test-files/case45-expect.meta
Normal file
49
test/metaflac-test-files/case45-expect.meta
Normal file
@ -0,0 +1,49 @@
|
||||
METADATA block #0
|
||||
type: 0 (STREAMINFO)
|
||||
is last: false
|
||||
length: 34
|
||||
sample_rate: 8000 Hz
|
||||
channels: 1
|
||||
bits-per-sample: 8
|
||||
total samples: 80000
|
||||
MD5 signature: a042237c5493fdb9656b94a83608d11a
|
||||
METADATA block #1
|
||||
type: 3 (SEEKTABLE)
|
||||
is last: false
|
||||
length: 18
|
||||
seek points: 1
|
||||
point 0: sample_number=0
|
||||
METADATA block #2
|
||||
type: 4 (VORBIS_COMMENT)
|
||||
is last: false
|
||||
length: 117
|
||||
comments: 4
|
||||
comment[0]: f=0123456789abcdefghij
|
||||
comment[1]: TITLE=Tittle
|
||||
comment[2]: artist=Fartist
|
||||
comment[3]: artist=artits
|
||||
METADATA block #3
|
||||
type: 5 (CUESHEET)
|
||||
is last: false
|
||||
length: 480
|
||||
media catalog number: 1234567890123
|
||||
lead-in: 0
|
||||
is CD: false
|
||||
number of tracks: 2
|
||||
track[0]
|
||||
offset: 0
|
||||
number: 1
|
||||
ISRC:
|
||||
type: AUDIO
|
||||
pre-emphasis: false
|
||||
number of index points: 1
|
||||
index[0]
|
||||
offset: 0
|
||||
number: 1
|
||||
track[1]
|
||||
offset: 80000
|
||||
number: 1 (LEAD-OUT)
|
||||
METADATA block #4
|
||||
type: 1 (PADDING)
|
||||
is last: true
|
||||
length: 147
|
@ -23,26 +23,36 @@ die ()
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ x = x"$1" ] ; then
|
||||
if [ x = x"$1" ] ; then
|
||||
BUILD=debug
|
||||
else
|
||||
BUILD="$1"
|
||||
fi
|
||||
|
||||
LD_LIBRARY_PATH=../src/libFLAC/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=../src/libOggFLAC/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=../src/share/getopt/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
PATH=../src/flac:$PATH
|
||||
PATH=../src/metaflac:$PATH
|
||||
PATH=../obj/$BUILD/bin:$PATH
|
||||
# change to 'false' to show all flac/metaflac output (useful for debugging)
|
||||
if true ; then
|
||||
SILENT='--silent'
|
||||
TOTALLY_SILENT='--totally-silent'
|
||||
else
|
||||
SILENT=''
|
||||
TOTALLY_SILENT=''
|
||||
fi
|
||||
|
||||
flacfile=metaflac.flac
|
||||
LD_LIBRARY_PATH=`pwd`/../src/libFLAC/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../src/libOggFLAC/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../src/share/grabbag/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../src/share/getopt/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../src/share/utf8/.libs:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=`pwd`/../obj/$BUILD/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
PATH=`pwd`/../src/flac:$PATH
|
||||
PATH=`pwd`/../src/metaflac:$PATH
|
||||
PATH=`pwd`/../obj/$BUILD/bin:$PATH
|
||||
|
||||
testdir="metaflac-test-files"
|
||||
flacfile="metaflac.flac"
|
||||
|
||||
flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
|
||||
metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac executable"
|
||||
@ -65,24 +75,17 @@ run_metaflac ()
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Generating stream..."
|
||||
if [ -f /bin/sh.exe ] ; then
|
||||
inputfile=/bin/sh.exe
|
||||
elif [ -f /bin/sh ] ; then
|
||||
inputfile=/bin/sh
|
||||
else
|
||||
inputfile="$0"
|
||||
fi
|
||||
if run_flac --force --verify -0 --output-name=$flacfile --force-raw-format --endian=big --sign=signed --channels=1 --bps=8 --sample-rate=44100 $inputfile ; then
|
||||
chmod +w $flacfile
|
||||
else
|
||||
die "ERROR during generation"
|
||||
fi
|
||||
|
||||
check_exit ()
|
||||
run_metaflac_silent ()
|
||||
{
|
||||
exit_code=$?
|
||||
[ $exit_code = 0 ] || die "ERROR, exit code = $exit_code"
|
||||
if [ -z "$SILENT" ] ; then
|
||||
run_metaflac $*
|
||||
else
|
||||
if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
|
||||
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 2>/dev/null 4>>test_metaflac.valgrind.log
|
||||
else
|
||||
metaflac $* 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_flac ()
|
||||
@ -90,251 +93,222 @@ check_flac ()
|
||||
run_flac --silent --test $flacfile || die "ERROR in $flacfile" 1>&2
|
||||
}
|
||||
|
||||
echo "Generating stream..."
|
||||
bytes=80000
|
||||
if dd if=/dev/zero ibs=1 count=$bytes | flac --force --verify -0 --input-size=$bytes --output-name=$flacfile --force-raw-format --endian=big --sign=signed --channels=1 --bps=8 --sample-rate=8000 - ; then
|
||||
chmod +w $flacfile
|
||||
else
|
||||
die "ERROR during generation"
|
||||
fi
|
||||
|
||||
check_flac
|
||||
|
||||
(set -x && run_metaflac --list $flacfile)
|
||||
check_exit
|
||||
echo
|
||||
|
||||
(set -x &&
|
||||
run_metaflac \
|
||||
--show-md5sum \
|
||||
--show-min-blocksize \
|
||||
--show-max-blocksize \
|
||||
--show-min-framesize \
|
||||
--show-max-framesize \
|
||||
--show-sample-rate \
|
||||
--show-channels \
|
||||
--show-bps \
|
||||
--show-total-samples \
|
||||
$flacfile
|
||||
)
|
||||
check_exit
|
||||
filter ()
|
||||
{
|
||||
# minor danger, changing vendor strings will change the length of the
|
||||
# VORBIS_COMMENT block, but if we add "^ length: " to the patterns,
|
||||
# we lose info about PADDING size that we need
|
||||
grep -Ev '^ vendor string: |^ m..imum .....size: ' | sed -e 's/, stream_offset.*//'
|
||||
}
|
||||
metaflac_test ()
|
||||
{
|
||||
case="$1"
|
||||
desc="$2"
|
||||
args="$3"
|
||||
expect="$testdir/$case-expect.meta"
|
||||
echo -n "test $case: $desc... "
|
||||
run_metaflac $args $flacfile | filter > $testdir/out.meta || die "ERROR running metaflac"
|
||||
diff -q -w $expect $testdir/out.meta 2>/dev/null || die "ERROR: metadata does not match expected $expect"
|
||||
echo OK
|
||||
}
|
||||
|
||||
(set -x && run_metaflac --preserve-modtime --add-padding=12345 $flacfile)
|
||||
check_exit
|
||||
metaflac_test case00 "--list" "--list"
|
||||
|
||||
metaflac_test case01 "STREAMINFO --show-* shortcuts" "
|
||||
--show-md5sum
|
||||
--show-min-blocksize
|
||||
--show-max-blocksize
|
||||
--show-min-framesize
|
||||
--show-max-framesize
|
||||
--show-sample-rate
|
||||
--show-channels
|
||||
--show-bps
|
||||
--show-total-samples"
|
||||
|
||||
run_metaflac --preserve-modtime --add-padding=12345 $flacfile
|
||||
check_flac
|
||||
metaflac_test case02 "--add-padding" "--list"
|
||||
|
||||
# some flavors of /bin/sh (e.g. Darwin's) won't even handle quoted spaces, so we underscore:
|
||||
(set -x && run_metaflac --set-tag="ARTIST=The_artist_formerly_known_as_the_artist..." $flacfile)
|
||||
check_exit
|
||||
run_metaflac --set-tag="ARTIST=The_artist_formerly_known_as_the_artist..." $flacfile
|
||||
check_flac
|
||||
metaflac_test case03 "--set-tag=ARTIST" "--list"
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --set-tag="ARTIST=Chuck_Woolery" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --set-tag="ARTIST=Chuck_Woolery" $flacfile
|
||||
check_flac
|
||||
metaflac_test case04 "--set-tag=ARTIST" "--list"
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --set-tag="ARTIST=Vern" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --set-tag="ARTIST=Vern" $flacfile
|
||||
check_flac
|
||||
metaflac_test case05 "--set-tag=ARTIST" "--list"
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --set-tag="TITLE=He_who_smelt_it_dealt_it" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --set-tag="TITLE=He_who_smelt_it_dealt_it" $flacfile
|
||||
check_flac
|
||||
metaflac_test case06 "--set-tag=TITLE" "--list"
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
metaflac_test case07 "--show-vendor-tag --show-tag=ARTIST" "--show-vendor-tag --show-tag=ARTIST"
|
||||
|
||||
(set -x && run_metaflac --show-vendor-tag --show-tag=ARTIST $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --remove-first-tag=ARTIST $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-first-tag=ARTIST $flacfile
|
||||
check_flac
|
||||
metaflac_test case08 "--remove-first-tag=ARTIST" "--list"
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --remove-tag=ARTIST $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-tag=ARTIST $flacfile
|
||||
check_flac
|
||||
metaflac_test case09 "--remove-tag=ARTIST" "--list"
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
metaflac_test case10 "--list --block-type=VORBIS_COMMENT" "--list --block-type=VORBIS_COMMENT"
|
||||
metaflac_test case11 "--list --block-number=0" "--list --block-number=0"
|
||||
metaflac_test case12 "--list --block-number=1,2,999" "--list --block-number=1,2,999"
|
||||
metaflac_test case13 "--list --block-type=VORBIS_COMMENT,PADDING" "--list --block-type=VORBIS_COMMENT,PADDING"
|
||||
metaflac_test case14 "--list --except-block-type=SEEKTABLE,VORBIS_COMMENT" "--list --except-block-type=SEEKTABLE,VORBIS_COMMENT"
|
||||
metaflac_test case15 "--list --except-block-type=STREAMINFO" "--list --except-block-type=STREAMINFO"
|
||||
|
||||
(set -x && run_metaflac --list --block-number=0 $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --list --block-number=1,2,999 $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT,PADDING $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --list --except-block-type=SEEKTABLE,VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --add-padding=4321 $flacfile $flacfile)
|
||||
check_exit
|
||||
run_metaflac --add-padding=4321 $flacfile $flacfile
|
||||
check_flac
|
||||
metaflac_test case16 "--add-padding=4321 * 2" "--list"
|
||||
|
||||
(set -x && run_metaflac --merge-padding $flacfile)
|
||||
check_exit
|
||||
run_metaflac --merge-padding $flacfile
|
||||
check_flac
|
||||
metaflac_test case17 "--merge-padding" "--list"
|
||||
|
||||
(set -x && run_metaflac --add-padding=0 $flacfile)
|
||||
check_exit
|
||||
run_metaflac --add-padding=0 $flacfile
|
||||
check_flac
|
||||
metaflac_test case18 "--add-padding=0" "--list"
|
||||
|
||||
(set -x && run_metaflac --sort-padding $flacfile)
|
||||
check_exit
|
||||
run_metaflac --sort-padding $flacfile
|
||||
check_flac
|
||||
metaflac_test case19 "--sort-padding" "--list"
|
||||
|
||||
(set -x && run_metaflac --add-padding=0 $flacfile)
|
||||
check_exit
|
||||
run_metaflac --add-padding=0 $flacfile
|
||||
check_flac
|
||||
metaflac_test case20 "--add-padding=0" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags $flacfile
|
||||
check_flac
|
||||
metaflac_test case21 "--remove-all-tags" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove --block-number=1,99 --dont-use-padding $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove --block-number=1,99 --dont-use-padding $flacfile
|
||||
check_flac
|
||||
metaflac_test case22 "--remove --block-number=1,99 --dont-use-padding" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove --block-number=99 --dont-use-padding $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove --block-number=99 --dont-use-padding $flacfile
|
||||
check_flac
|
||||
metaflac_test case23 "--remove --block-number=99 --dont-use-padding" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove --block-type=PADDING $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove --block-type=PADDING $flacfile
|
||||
check_flac
|
||||
metaflac_test case24 "--remove --block-type=PADDING" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove --block-type=PADDING --dont-use-padding $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove --block-type=PADDING --dont-use-padding $flacfile
|
||||
check_flac
|
||||
metaflac_test case25 "--remove --block-type=PADDING --dont-use-padding" "--list"
|
||||
|
||||
(set -x && run_metaflac --add-padding=0 $flacfile $flacfile)
|
||||
check_exit
|
||||
run_metaflac --add-padding=0 $flacfile $flacfile
|
||||
check_flac
|
||||
metaflac_test case26 "--add-padding=0 * 2" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove --except-block-type=PADDING $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove --except-block-type=PADDING $flacfile
|
||||
check_flac
|
||||
metaflac_test case27 "--remove --except-block-type=PADDING" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all $flacfile
|
||||
check_flac
|
||||
metaflac_test case28 "--remove-all" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all --dont-use-padding $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all --dont-use-padding $flacfile
|
||||
check_flac
|
||||
metaflac_test case29 "--remove-all --dont-use-padding" "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all --dont-use-padding $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all --dont-use-padding $flacfile
|
||||
check_flac
|
||||
metaflac_test case30 "--remove-all --dont-use-padding" "--list"
|
||||
|
||||
(set -x && run_metaflac --set-tag="f=0123456789abcdefghij" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --set-tag="f=0123456789abcdefghij" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case31 "--set-tag=..." "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags --set-tag="f=0123456789abcdefghi" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags --set-tag="f=0123456789abcdefghi" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case32 "--remove-all-tags --set-tag=..." "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags --set-tag="f=0123456789abcde" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags --set-tag="f=0123456789abcde" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case33 "--remove-all-tags --set-tag=..." "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags --set-tag="f=0" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags --set-tag="f=0" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case34 "--remove-all-tags --set-tag=..." "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags --set-tag="f=0123456789" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags --set-tag="f=0123456789" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case35 "--remove-all-tags --set-tag=..." "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags --set-tag="f=0123456789abcdefghi" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags --set-tag="f=0123456789abcdefghi" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case36 "--remove-all-tags --set-tag=..." "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags --set-tag="f=0123456789" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags --set-tag="f=0123456789" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case37 "--remove-all-tags --set-tag=..." "--list"
|
||||
|
||||
(set -x && run_metaflac --remove-all-tags --set-tag="f=0123456789abcdefghij" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --remove-all-tags --set-tag="f=0123456789abcdefghij" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
|
||||
check_exit
|
||||
metaflac_test case38 "--remove-all-tags --set-tag=..." "--list"
|
||||
|
||||
(set -x && echo "TITLE=Tittle" | run_metaflac --import-tags-from=- $flacfile)
|
||||
check_exit
|
||||
echo "TITLE=Tittle" | run_metaflac --import-tags-from=- $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
metaflac_test case39 "--import-tags-from=-" "--list"
|
||||
|
||||
cat > vc.txt << EOF
|
||||
artist=Fartist
|
||||
artist=artits
|
||||
EOF
|
||||
(set -x && run_metaflac --import-tags-from=vc.txt $flacfile)
|
||||
check_exit
|
||||
run_metaflac --import-tags-from=vc.txt $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
metaflac_test case40 "--import-tags-from=[FILE]" "--list"
|
||||
|
||||
rm vc.txt
|
||||
|
||||
run_metaflac --add-replay-gain $flacfile
|
||||
check_flac
|
||||
metaflac_test case41 "--add-replay-gain" "--list"
|
||||
|
||||
run_metaflac --remove-replay-gain $flacfile
|
||||
check_flac
|
||||
metaflac_test case42 "--remove-replay-gain" "--list"
|
||||
|
||||
cs_in=cuesheets/good.000.cue
|
||||
cs_out=metaflac.cue
|
||||
cs_out2=metaflac2.cue
|
||||
(set -x && run_metaflac --import-cuesheet-from="$cs_in" $flacfile)
|
||||
check_exit
|
||||
run_metaflac --import-cuesheet-from="$cs_in" $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --export-cuesheet-to=$cs_out $flacfile)
|
||||
check_exit
|
||||
(set -x && run_metaflac --remove --block-type=CUESHEET $flacfile)
|
||||
check_exit
|
||||
metaflac_test case43 "--import-cuesheet-from" "--list"
|
||||
run_metaflac --export-cuesheet-to=$cs_out $flacfile
|
||||
run_metaflac --remove --block-type=CUESHEET $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --import-cuesheet-from=$cs_out $flacfile)
|
||||
check_exit
|
||||
metaflac_test case44 "--remove --block-type=CUESHEET" "--list"
|
||||
run_metaflac --import-cuesheet-from=$cs_out $flacfile
|
||||
check_flac
|
||||
(set -x && run_metaflac --export-cuesheet-to=$cs_out2 $flacfile)
|
||||
check_exit
|
||||
metaflac_test case45 "--import-cuesheet-from" "--list"
|
||||
run_metaflac --export-cuesheet-to=$cs_out2 $flacfile
|
||||
echo "comparing cuesheets:"
|
||||
diff $cs_out $cs_out2 || die "ERROR, cuesheets should be identical"
|
||||
echo identical
|
||||
|
||||
rm -f $cs_out $cs_out2
|
||||
|
||||
(set -x && run_metaflac --add-replay-gain $flacfile)
|
||||
check_exit
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
(set -x && run_metaflac --remove-replay-gain $flacfile)
|
||||
check_exit
|
||||
check_flac
|
||||
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
|
||||
check_exit
|
||||
|
||||
echo -n "Testing FLAC file with unknown metadata... "
|
||||
cp -p metaflac.flac.in $flacfile
|
||||
# remove the VORBIS_COMMENT block so vendor string changes don't interfere with the comparison:
|
||||
@ -342,4 +316,6 @@ run_metaflac --remove --block-type=VORBIS_COMMENT --dont-use-padding $flacfile
|
||||
cmp $flacfile metaflac.flac.ok || die "ERROR, $flacfile and metaflac.flac.ok differ"
|
||||
echo OK
|
||||
|
||||
rm -f out.flac out.meta
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user