Closed
Description
This issue is a follow-up on #54 (which handles FLAC stream decoding). In particular, this issue handles issues of FLAC audio sample decoding (e.g. mismatch between expected audio samples and decoded audio samples).
The IETF flac-test-files repository contains 64 FLAC files, published by @ktmf01, which help exercise corner cases of the FLAC decoder.
When adding these test cases to the test suite, 7 of 64 FLAC files resulted in audio sample decoding failures, namely:
--- FAIL: TestFrameHash/../testdata/flac-test-files/subset/16_-_partition_order_8_containing_escaped_partitions.flac (0.05s)
--- FAIL: TestFrameHash/../testdata/flac-test-files/subset/22_-_12_bit_per_sample.flac (3.24s)
--- FAIL: TestFrameHash/../testdata/flac-test-files/subset/32_-_high_resolution_audio,_partition_order_8_containing_escaped_partitions.flac (0.14s)
--- FAIL: TestFrameHash/../testdata/flac-test-files/subset/37_-_20_bit_per_sample.flac (11.43s)
--- FAIL: TestFrameHash/../testdata/flac-test-files/subset/62_-_predictor_overflow_check,_20-bit.flac (1.63s)
--- FAIL: TestFrameHash/../testdata/flac-test-files/subset/63_-_predictor_overflow_check,_24-bit.flac (0.01s)
--- FAIL: TestFrameHash/../testdata/flac-test-files/subset/64_-_rice_partitions_with_escape_code_zero.flac (0.01s)
This issue tracks the resolution of the identified decoding issues.
-
16_-_partition_order_8_containing_escaped_partitions.flac
-
22_-_12_bit_per_sample.flac
-
32_-_high_resolution_audio,_partition_order_8_containing_escaped_partitions.flac
-
37_-_20_bit_per_sample.flac
-
62_-_predictor_overflow_check,_20-bit.flac
-
63_-_predictor_overflow_check,_24-bit.flac
-
64_-_rice_partitions_with_escape_code_zero.flac
To reproduce, run:
go test -v github.com/mewkiz/flac/frame
Remember to initiate the submodule for IETF test cases in the testdata/flac-test-files directory:
git submodule update --init --recursive