spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit efef66c892ce1d0f384022a76730347bb017b347
parent ae8cd33b8e687896e26e5d8c72efd5e7f329342e
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Fri, 29 Mar 2013 09:16:42 -0700

tests: WMA demuxing/decoding

Diffstat:
Msrc/spek-audio.cc | 4+++-
Atests/samples/2ch-44100Hz-v1.wma | 0
Atests/samples/2ch-44100Hz-v2.wma | 0
Mtests/test-audio.cc | 4++++
4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/spek-audio.cc b/src/spek-audio.cc @@ -137,7 +137,9 @@ std::unique_ptr<AudioFile> 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 Binary files differ. diff --git a/tests/samples/2ch-44100Hz-v2.wma b/tests/samples/2ch-44100Hz-v2.wma Binary files differ. diff --git 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;