tests: Musepack demuxing/decoding

This commit is contained in:
Alexander Kojevnikov 2013-03-28 10:17:58 -07:00
parent 4e683c3324
commit 6a0d525fe4
4 changed files with 5 additions and 2 deletions

View File

@ -136,8 +136,9 @@ std::unique_ptr<AudioFile> Audio::open(const std::string& file_name)
// APE uses bpcs, FLAC uses bprs.
bits_per_sample = codec_context->bits_per_coded_sample;
}
if (codec_context->codec_id == AV_CODEC_ID_AAC) {
// AAC decoder sets both bps and bitrate.
if (codec_context->codec_id == AV_CODEC_ID_AAC ||
codec_context->codec_id == AV_CODEC_ID_MUSEPACK8) {
// These decoders set both bps and bitrate.
bits_per_sample = 0;
}
if (bits_per_sample) {

Binary file not shown.

View File

@ -73,6 +73,7 @@ void test_audio_info()
{"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}},
{"2ch-44100Hz-std.mpc", {AudioError::OK, "Musepack", 0, 44100, 0, 2, 0.0}},
};
for (const auto& item : files) {
run(

View File

@ -63,6 +63,7 @@ void test_audio_read()
{"2ch-44100Hz-q5.ogg", 2 * 1024 * 4 + 1152},
{"2ch-44100Hz.dts", 10240},
{"2ch-44100Hz.ac3", 9 * 1024},
{"2ch-44100Hz-std.mpc", 11 * 1024 + 256},
};
for (const auto& item : files) {
run(