diff --git a/tests/samples/2ch-44100Hz.ac3 b/tests/samples/2ch-44100Hz.ac3 new file mode 100644 index 0000000..30e21bb Binary files /dev/null and b/tests/samples/2ch-44100Hz.ac3 differ diff --git a/tests/test-audio-info.cc b/tests/test-audio-info.cc index f9dfab1..9991eae 100644 --- a/tests/test-audio-info.cc +++ b/tests/test-audio-info.cc @@ -53,6 +53,7 @@ void test_audio_info() const double MP3_T = 5.0 * 1152 / 44100; // 5 frames * duration per mp3 frame const double AAC_T = (10240 + 628) / 2.0 / 44100; const double DCA_T = 8.0 * 21180 / 1411216; // file size / bit rate + const double AC3_T = 8.0 * 2490 / 190764; // file size / bit rate std::map files = { {"no.file", {AudioError::CANNOT_OPEN_FILE, "", 0, 0, 0, 0, 0.0}}, @@ -70,6 +71,7 @@ void test_audio_info() {"2ch-44100Hz-q100.m4a", {AudioError::OK, "AAC", 159649, 44100, 0, 2, AAC_T}}, {"2ch-44100Hz-q5.ogg", {AudioError::OK, "Vorbis", 160000, 44100, 0, 2, 0.1}}, {"2ch-44100Hz.dts", {AudioError::OK, "DCA", 1411200, 44100, 0, 2, DCA_T}}, + {"2ch-44100Hz.ac3", {AudioError::OK, "ATSC A/52", 192000, 44100, 0, 2, AC3_T}}, }; for (const auto& item : files) { run( diff --git a/tests/test-audio-read.cc b/tests/test-audio-read.cc index ed3e38f..0622788 100644 --- a/tests/test-audio-read.cc +++ b/tests/test-audio-read.cc @@ -61,6 +61,7 @@ void test_audio_read() {"2ch-44100Hz-q100.m4a", 10240}, {"2ch-44100Hz-q5.ogg", 2 * 1024 * 4 + 1152}, {"2ch-44100Hz.dts", 10240}, + {"2ch-44100Hz.ac3", 9 * 1024}, }; for (const auto& item : files) { run(