Skip to content

Commit

Permalink
tests: WMA demuxing/decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkay committed Mar 29, 2013
1 parent ae8cd33 commit efef66c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/spek-audio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Binary file added tests/samples/2ch-44100Hz-v1.wma
Binary file not shown.
Binary file added tests/samples/2ch-44100Hz-v2.wma
Binary file not shown.
4 changes: 4 additions & 0 deletions tests/test-audio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit efef66c

Please sign in to comment.