mirror of
https://github.com/taglib/taglib.git
synced 2025-11-12 20:52:52 -05:00
Mark deprected methods and remove internal usage
This does not put the deprecated marker on methods that will or could resolve to the same overload, e.g.: void foo(bool bar = true); // <-- not marked void foo(Bar bar) // <-- since this will have a default argument in the new version
This commit is contained in:
@ -51,14 +51,12 @@ public:
|
||||
{
|
||||
RIFF::AIFF::File f(TEST_FILE_PATH_C("empty.aiff"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(67, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(706, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth());
|
||||
CPPUNIT_ASSERT_EQUAL(2941U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(false, f.audioProperties()->isAiffC());
|
||||
}
|
||||
@ -67,14 +65,12 @@ public:
|
||||
{
|
||||
RIFF::AIFF::File f(TEST_FILE_PATH_C("alaw.aifc"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(37, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(355, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth());
|
||||
CPPUNIT_ASSERT_EQUAL(1622U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(true, f.audioProperties()->isAiffC());
|
||||
CPPUNIT_ASSERT_EQUAL(ByteVector("ALAW"), f.audioProperties()->compressionType());
|
||||
|
||||
@ -57,7 +57,6 @@ public:
|
||||
{
|
||||
APE::File f(TEST_FILE_PATH_C("mac-399.ape"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate());
|
||||
@ -72,7 +71,6 @@ public:
|
||||
{
|
||||
APE::File f(TEST_FILE_PATH_C("mac-399-tagged.ape"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate());
|
||||
@ -87,7 +85,6 @@ public:
|
||||
{
|
||||
APE::File f(TEST_FILE_PATH_C("mac-399-id3v2.ape"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate());
|
||||
@ -102,7 +99,6 @@ public:
|
||||
{
|
||||
APE::File f(TEST_FILE_PATH_C("mac-396.ape"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate());
|
||||
@ -117,7 +113,6 @@ public:
|
||||
{
|
||||
APE::File f(TEST_FILE_PATH_C("mac-390-hdr.ape"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(15, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(15, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(15630, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate());
|
||||
|
||||
@ -59,7 +59,6 @@ public:
|
||||
{
|
||||
ASF::File f(TEST_FILE_PATH_C("silence-1.wma"));
|
||||
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());
|
||||
@ -76,7 +75,6 @@ public:
|
||||
{
|
||||
ASF::File f(TEST_FILE_PATH_C("lossless.wma"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3549, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(1152, f.audioProperties()->bitrate());
|
||||
|
||||
@ -77,7 +77,6 @@ public:
|
||||
|
||||
i.clear();
|
||||
CPPUNIT_ASSERT(i.isEmpty());
|
||||
CPPUNIT_ASSERT(!i.isNull()); // deprecated, but worth it to check.
|
||||
}
|
||||
|
||||
void testFind1()
|
||||
|
||||
@ -326,14 +326,12 @@ public:
|
||||
{
|
||||
FLAC::File f(TEST_FILE_PATH_C("sinewave.flac"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(145, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth());
|
||||
CPPUNIT_ASSERT_EQUAL(156556ULL, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
ByteVector("\xcf\xe3\xd9\xda\xba\xde\xab\x2c\xbf\x2c\xa2\x35\x27\x4b\x7f\x76"),
|
||||
|
||||
@ -251,8 +251,10 @@ public:
|
||||
"\x01"
|
||||
"d\x00"
|
||||
"\x00", 14);
|
||||
ID3v2::Header header;
|
||||
header.setMajorVersion(2);
|
||||
ID3v2::AttachedPictureFrame *frame =
|
||||
dynamic_cast<TagLib::ID3v2::AttachedPictureFrame*>(factory->createFrame(data, (unsigned int)2));
|
||||
dynamic_cast<TagLib::ID3v2::AttachedPictureFrame *>(factory->createFrame(data, &header));
|
||||
|
||||
CPPUNIT_ASSERT(frame);
|
||||
CPPUNIT_ASSERT_EQUAL(String("image/jpeg"), frame->mimeType());
|
||||
@ -272,8 +274,10 @@ public:
|
||||
"\x01"
|
||||
"d\x00"
|
||||
"\x00", 14);
|
||||
ID3v2::Header header;
|
||||
header.setMajorVersion(2);
|
||||
ID3v2::UnknownFrame *frame =
|
||||
dynamic_cast<TagLib::ID3v2::UnknownFrame*>(factory->createFrame(data, (unsigned int)2));
|
||||
dynamic_cast<TagLib::ID3v2::UnknownFrame*>(factory->createFrame(data, &header));
|
||||
|
||||
CPPUNIT_ASSERT(frame);
|
||||
|
||||
@ -665,8 +669,10 @@ public:
|
||||
"\x00\x00" // Frame flags
|
||||
"\x00" // Encoding
|
||||
"(22)Death Metal", 26); // Text
|
||||
ID3v2::Header header;
|
||||
header.setMajorVersion(3);
|
||||
ID3v2::TextIdentificationFrame *frame =
|
||||
dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, (unsigned int)3));
|
||||
dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, &header));
|
||||
CPPUNIT_ASSERT_EQUAL((unsigned int)1, frame->fieldList().size());
|
||||
CPPUNIT_ASSERT_EQUAL(String("Death Metal"), frame->fieldList()[0]);
|
||||
|
||||
@ -684,8 +690,10 @@ public:
|
||||
"\x00\x00" // Frame flags
|
||||
"\x00" // Encoding
|
||||
"(4)Eurodisco", 23); // Text
|
||||
ID3v2::Header header;
|
||||
header.setMajorVersion(3);
|
||||
ID3v2::TextIdentificationFrame *frame =
|
||||
dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, (unsigned int)3));
|
||||
dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, &header));
|
||||
CPPUNIT_ASSERT_EQUAL((unsigned int)2, frame->fieldList().size());
|
||||
CPPUNIT_ASSERT_EQUAL(String("4"), frame->fieldList()[0]);
|
||||
CPPUNIT_ASSERT_EQUAL(String("Eurodisco"), frame->fieldList()[1]);
|
||||
@ -703,8 +711,9 @@ public:
|
||||
"\x00\x00" // Frame flags
|
||||
"\0" // Encoding
|
||||
"14\0Eurodisco", 23); // Text
|
||||
ID3v2::Header header;
|
||||
ID3v2::TextIdentificationFrame *frame =
|
||||
dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, (unsigned int)4));
|
||||
dynamic_cast<TagLib::ID3v2::TextIdentificationFrame*>(factory->createFrame(data, &header));
|
||||
CPPUNIT_ASSERT_EQUAL((unsigned int)2, frame->fieldList().size());
|
||||
CPPUNIT_ASSERT_EQUAL(String("14"), frame->fieldList()[0]);
|
||||
CPPUNIT_ASSERT_EQUAL(String("Eurodisco"), frame->fieldList()[1]);
|
||||
@ -954,10 +963,13 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(frameDataMvin, frameMvin->render());
|
||||
|
||||
ID3v2::FrameFactory *factory = ID3v2::FrameFactory::instance();
|
||||
ID3v2::Header header;
|
||||
ID3v2::TextIdentificationFrame *parsedFrameMvnm =
|
||||
dynamic_cast<ID3v2::TextIdentificationFrame *>(factory->createFrame(frameDataMvnm));
|
||||
dynamic_cast<ID3v2::TextIdentificationFrame *>(
|
||||
factory->createFrame(frameDataMvnm, &header));
|
||||
ID3v2::TextIdentificationFrame *parsedFrameMvin =
|
||||
dynamic_cast<ID3v2::TextIdentificationFrame *>(factory->createFrame(frameDataMvin));
|
||||
dynamic_cast<ID3v2::TextIdentificationFrame *>(
|
||||
factory->createFrame(frameDataMvin, &header));
|
||||
CPPUNIT_ASSERT(parsedFrameMvnm);
|
||||
CPPUNIT_ASSERT(parsedFrameMvin);
|
||||
CPPUNIT_ASSERT_EQUAL(String("Movement Name"), parsedFrameMvnm->toString());
|
||||
@ -986,8 +998,10 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(frameDataGrp1, frameGrp1->render());
|
||||
|
||||
ID3v2::FrameFactory *factory = ID3v2::FrameFactory::instance();
|
||||
ID3v2::Header header;
|
||||
ID3v2::TextIdentificationFrame *parsedFrameGrp1 =
|
||||
dynamic_cast<ID3v2::TextIdentificationFrame *>(factory->createFrame(frameDataGrp1));
|
||||
dynamic_cast<ID3v2::TextIdentificationFrame *>(
|
||||
factory->createFrame(frameDataGrp1, &header));
|
||||
CPPUNIT_ASSERT(parsedFrameGrp1);
|
||||
CPPUNIT_ASSERT_EQUAL(String("Grouping"), parsedFrameGrp1->toString());
|
||||
|
||||
@ -1210,14 +1224,14 @@ public:
|
||||
{
|
||||
MPEG::File f(newname.c_str());
|
||||
f.ID3v2Tag()->setTitle(longText(64 * 1024));
|
||||
f.save(MPEG::File::ID3v2, true);
|
||||
f.save(MPEG::File::ID3v2, File::StripOthers);
|
||||
}
|
||||
{
|
||||
MPEG::File f(newname.c_str());
|
||||
CPPUNIT_ASSERT(f.hasID3v2Tag());
|
||||
CPPUNIT_ASSERT_EQUAL(74789L, f.length());
|
||||
f.ID3v2Tag()->setTitle("ABCDEFGHIJ");
|
||||
f.save(MPEG::File::ID3v2, true);
|
||||
f.save(MPEG::File::ID3v2, File::StripOthers);
|
||||
}
|
||||
{
|
||||
MPEG::File f(newname.c_str());
|
||||
|
||||
@ -67,7 +67,6 @@ public:
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("has-tags.m4a"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3708, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->bitrate());
|
||||
@ -82,7 +81,6 @@ public:
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("empty_alac.m4a"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3705, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->bitrate());
|
||||
@ -97,7 +95,6 @@ public:
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("blank_video.m4v"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(975, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(96, f.audioProperties()->bitrate());
|
||||
|
||||
@ -59,7 +59,6 @@ public:
|
||||
MPC::File f(TEST_FILE_PATH_C("sv8_header.mpc"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(8, f.audioProperties()->mpcVersion());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(1497, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitrate());
|
||||
@ -73,7 +72,6 @@ public:
|
||||
MPC::File f(TEST_FILE_PATH_C("click.mpc"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(7, f.audioProperties()->mpcVersion());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(40, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(318, f.audioProperties()->bitrate());
|
||||
@ -91,7 +89,6 @@ public:
|
||||
MPC::File f(TEST_FILE_PATH_C("sv5_header.mpc"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(5, f.audioProperties()->mpcVersion());
|
||||
CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(26371, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate());
|
||||
@ -105,7 +102,6 @@ public:
|
||||
MPC::File f(TEST_FILE_PATH_C("sv4_header.mpc"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(4, f.audioProperties()->mpcVersion());
|
||||
CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(26, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(26371, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->bitrate());
|
||||
|
||||
@ -73,7 +73,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("lame_cbr.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(1887164, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitrate());
|
||||
@ -86,7 +85,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("lame_vbr.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(1887, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(1887164, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(70, f.audioProperties()->bitrate());
|
||||
@ -99,7 +97,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("rare_frames.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(222, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(222, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(222198, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(233, f.audioProperties()->bitrate());
|
||||
@ -112,7 +109,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("bladeenc.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3553, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitrate());
|
||||
@ -131,7 +127,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("invalid-frames1.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(392, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(160, f.audioProperties()->bitrate());
|
||||
@ -144,7 +139,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("invalid-frames2.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(314, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(192, f.audioProperties()->bitrate());
|
||||
@ -157,7 +151,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("invalid-frames3.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(183, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(320, f.audioProperties()->bitrate());
|
||||
@ -170,7 +163,6 @@ public:
|
||||
{
|
||||
MPEG::File f(TEST_FILE_PATH_C("mpeg2.mp3"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(5387, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(5387, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(5387285, f.audioProperties()->lengthInMilliseconds());
|
||||
}
|
||||
|
||||
@ -188,7 +188,6 @@ public:
|
||||
{
|
||||
Ogg::Vorbis::File f(TEST_FILE_PATH_C("empty.ogg"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitrate());
|
||||
|
||||
@ -50,7 +50,6 @@ public:
|
||||
{
|
||||
Ogg::Opus::File f(TEST_FILE_PATH_C("correctness_gain_silent_output.opus"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(7, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(7, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(7737, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(36, f.audioProperties()->bitrate());
|
||||
|
||||
@ -44,7 +44,6 @@ public:
|
||||
{
|
||||
Ogg::Speex::File f(TEST_FILE_PATH_C("empty.spx"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(53, f.audioProperties()->bitrate());
|
||||
|
||||
@ -75,7 +75,6 @@ public:
|
||||
|
||||
s.clear();
|
||||
CPPUNIT_ASSERT(s.isEmpty());
|
||||
CPPUNIT_ASSERT(!s.isNull()); // deprecated, but still worth it to check.
|
||||
|
||||
String unicode("José Carlos", String::UTF8);
|
||||
CPPUNIT_ASSERT(strcmp(unicode.toCString(), "Jos\xe9 Carlos") == 0);
|
||||
|
||||
@ -50,7 +50,6 @@ public:
|
||||
{
|
||||
TrueAudio::File f(TEST_FILE_PATH_C("empty.tta"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(173, f.audioProperties()->bitrate());
|
||||
@ -65,7 +64,6 @@ public:
|
||||
{
|
||||
TrueAudio::File f(TEST_FILE_PATH_C("tagged.tta"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3685, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(173, f.audioProperties()->bitrate());
|
||||
|
||||
@ -59,14 +59,12 @@ public:
|
||||
{
|
||||
RIFF::WAV::File f(TEST_FILE_PATH_C("empty.wav"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3675, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(32, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(1000, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth());
|
||||
CPPUNIT_ASSERT_EQUAL(3675U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->format());
|
||||
}
|
||||
@ -75,14 +73,12 @@ public:
|
||||
{
|
||||
RIFF::WAV::File f(TEST_FILE_PATH_C("alaw.wav"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(128, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(8000, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(8, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(8, f.audioProperties()->sampleWidth());
|
||||
CPPUNIT_ASSERT_EQUAL(28400U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(6, f.audioProperties()->format());
|
||||
}
|
||||
@ -91,14 +87,12 @@ public:
|
||||
{
|
||||
RIFF::WAV::File f(TEST_FILE_PATH_C("float64.wav"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(97, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(5645, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(64, f.audioProperties()->sampleWidth());
|
||||
CPPUNIT_ASSERT_EQUAL(4281U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->format());
|
||||
}
|
||||
@ -277,14 +271,12 @@ public:
|
||||
{
|
||||
RIFF::WAV::File f(TEST_FILE_PATH_C("pcm_with_fact_chunk.wav"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3675, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(32, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(1000, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->sampleWidth());
|
||||
CPPUNIT_ASSERT_EQUAL(3675U, f.audioProperties()->sampleFrames());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->format());
|
||||
}
|
||||
|
||||
@ -53,7 +53,6 @@ public:
|
||||
{
|
||||
WavPack::File f(TEST_FILE_PATH_C("no_length.wv"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3705, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->bitrate());
|
||||
@ -69,7 +68,6 @@ public:
|
||||
{
|
||||
WavPack::File f(TEST_FILE_PATH_C("four_channels.wv"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3833, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(112, f.audioProperties()->bitrate());
|
||||
@ -85,7 +83,6 @@ public:
|
||||
{
|
||||
WavPack::File f(TEST_FILE_PATH_C("tagged.wv"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(3550, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(172, f.audioProperties()->bitrate());
|
||||
|
||||
Reference in New Issue
Block a user