mirror of
https://github.com/taglib/taglib.git
synced 2025-07-19 05:24:25 -04:00
ASF: AudioProperties improvements
Add lengthInSeconds(), lengthInMilliseconds() properties. (#503) Add bitsPerSample() property. (#360) Add some tests for audio properties. Add some supplementary comments.
This commit is contained in:
@ -31,10 +31,15 @@ public:
|
||||
void testAudioProperties()
|
||||
{
|
||||
ASF::File f(TEST_FILE_PATH_C("silence-1.wma"));
|
||||
CPPUNIT_ASSERT_EQUAL(4, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3712, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(48000, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(false, f.audioProperties()->isEncrypted());
|
||||
}
|
||||
|
||||
void testRead()
|
||||
|
Reference in New Issue
Block a user