mirror of
https://github.com/alexkay/spek.git
synced 2025-04-15 16:20:33 +03:00
tests: Musepack demuxing/decoding
This commit is contained in:
parent
4e683c3324
commit
6a0d525fe4
@ -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) {
|
||||
|
BIN
tests/samples/2ch-44100Hz-std.mpc
Normal file
BIN
tests/samples/2ch-44100Hz-std.mpc
Normal file
Binary file not shown.
@ -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(
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user