diff --git a/src/spek-audio.cc b/src/spek-audio.cc index 5c1615f..2c68165 100644 --- a/src/spek-audio.cc +++ b/src/spek-audio.cc @@ -137,7 +137,9 @@ std::unique_ptr Audio::open(const std::string& file_name) bits_per_sample = codec_context->bits_per_coded_sample; } if (codec_context->codec_id == AV_CODEC_ID_AAC || - codec_context->codec_id == AV_CODEC_ID_MUSEPACK8) { + codec_context->codec_id == AV_CODEC_ID_MUSEPACK8 || + codec_context->codec_id == AV_CODEC_ID_WMAV1 || + codec_context->codec_id == AV_CODEC_ID_WMAV2) { // These decoders set both bps and bitrate. bits_per_sample = 0; } diff --git a/tests/samples/2ch-44100Hz-v1.wma b/tests/samples/2ch-44100Hz-v1.wma new file mode 100644 index 0000000..023b6f9 Binary files /dev/null and b/tests/samples/2ch-44100Hz-v1.wma differ diff --git a/tests/samples/2ch-44100Hz-v2.wma b/tests/samples/2ch-44100Hz-v2.wma new file mode 100644 index 0000000..aeab502 Binary files /dev/null and b/tests/samples/2ch-44100Hz-v2.wma differ diff --git a/tests/test-audio.cc b/tests/test-audio.cc index b3c3f6b..97d80a5 100644 --- a/tests/test-audio.cc +++ b/tests/test-audio.cc @@ -115,6 +115,10 @@ void test_audio() {AudioError::OK, "ATSC A/52", 192000, 44100, 0, 2, AC3_T, 9 * 1024}}, {"2ch-44100Hz-std.mpc", {AudioError::OK, "Musepack", 0, 44100, 0, 2, 0.0, 11 * 1024 + 256}}, + {"2ch-44100Hz-v1.wma", + {AudioError::OK, "Windows Media Audio 1", 128000, 44100, 0, 2, 0.138, 12 * 1024}}, + {"2ch-44100Hz-v2.wma", + {AudioError::OK, "Windows Media Audio 2", 128000, 44100, 0, 2, 0.138, 12 * 1024}}, }; Audio audio;