mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Merge pull request #963 from dbry/wavpack-fixes
WavPack fixes with test file verifying issue #962
This commit is contained in:
BIN
tests/data/dsd_stereo.wv
Normal file
BIN
tests/data/dsd_stereo.wv
Normal file
Binary file not shown.
BIN
tests/data/non_standard_rate.wv
Normal file
BIN
tests/data/non_standard_rate.wv
Normal file
Binary file not shown.
@ -41,6 +41,8 @@ class TestWavPack : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST_SUITE(TestWavPack);
|
||||
CPPUNIT_TEST(testNoLengthProperties);
|
||||
CPPUNIT_TEST(testMultiChannelProperties);
|
||||
CPPUNIT_TEST(testDsdStereoProperties);
|
||||
CPPUNIT_TEST(testNonStandardRateProperties);
|
||||
CPPUNIT_TEST(testTaggedProperties);
|
||||
CPPUNIT_TEST(testFuzzedFile);
|
||||
CPPUNIT_TEST(testStripAndProperties);
|
||||
@ -79,6 +81,36 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(1031, f.audioProperties()->version());
|
||||
}
|
||||
|
||||
void testDsdStereoProperties()
|
||||
{
|
||||
WavPack::File f(TEST_FILE_PATH_C("dsd_stereo.wv"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(200, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(2096, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(8, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(true, f.audioProperties()->isLossless());
|
||||
CPPUNIT_ASSERT_EQUAL(352800, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(70560U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(1040, f.audioProperties()->version());
|
||||
}
|
||||
|
||||
void testNonStandardRateProperties()
|
||||
{
|
||||
WavPack::File f(TEST_FILE_PATH_C("non_standard_rate.wv"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3675, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(true, f.audioProperties()->isLossless());
|
||||
CPPUNIT_ASSERT_EQUAL(1000, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(3675U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(1040, f.audioProperties()->version());
|
||||
}
|
||||
|
||||
void testTaggedProperties()
|
||||
{
|
||||
WavPack::File f(TEST_FILE_PATH_C("tagged.wv"));
|
||||
|
Reference in New Issue
Block a user