diff --git a/taglib/audioproperties.h b/taglib/audioproperties.h index a2df2f46..d0684d17 100644 --- a/taglib/audioproperties.h +++ b/taglib/audioproperties.h @@ -26,6 +26,7 @@ #ifndef TAGLIB_AUDIOPROPERTIES_H #define TAGLIB_AUDIOPROPERTIES_H +#include "taglib.h" #include "taglib_export.h" #include @@ -77,6 +78,7 @@ namespace TagLib { * * \deprecated Use lengthInSeconds(). */ + TAGLIB_DEPRECATED virtual int length() const; /*! diff --git a/taglib/mpeg/id3v2/id3v2.h b/taglib/mpeg/id3v2/id3v2.h index 36e76429..6dfba5fb 100644 --- a/taglib/mpeg/id3v2/id3v2.h +++ b/taglib/mpeg/id3v2/id3v2.h @@ -15,8 +15,8 @@ namespace TagLib { * Used to specify which version of the ID3 standard to use when saving tags. */ enum Version { - v3 = 3, //(x) #endif -#if __cplusplus >= 201402 #define TAGLIB_DEPRECATED [[deprecated]] -#elif defined(__GNUC__) || defined(__clang__) -#define TAGLIB_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) -#define TAGLIB_DEPRECATED __declspec(deprecated) -#else -#define TAGLIB_DEPRECATED -#endif #ifndef _WIN32 #include diff --git a/taglib/toolkit/tfile.h b/taglib/toolkit/tfile.h index d0945998..2fb1d5ca 100644 --- a/taglib/toolkit/tfile.h +++ b/taglib/toolkit/tfile.h @@ -66,8 +66,8 @@ namespace TagLib { * Specify which tags to strip either explicitly, or on save. */ enum StripTags { - StripNone, //length()); + CPPUNIT_ASSERT_EQUAL( 0, p->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL( 0, p->bitrate()); CPPUNIT_ASSERT_EQUAL( 0, p->sampleRate()); CPPUNIT_ASSERT_EQUAL(64, p->channels()); diff --git a/tests/test_mod.cpp b/tests/test_mod.cpp index 2986c7d1..2e20b391 100644 --- a/tests/test_mod.cpp +++ b/tests/test_mod.cpp @@ -113,7 +113,7 @@ private: CPPUNIT_ASSERT(nullptr != p); CPPUNIT_ASSERT(nullptr != t); - CPPUNIT_ASSERT_EQUAL(0, p->length()); + CPPUNIT_ASSERT_EQUAL(0, p->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(0, p->bitrate()); CPPUNIT_ASSERT_EQUAL(0, p->sampleRate()); CPPUNIT_ASSERT_EQUAL(8, p->channels()); diff --git a/tests/test_s3m.cpp b/tests/test_s3m.cpp index 0438ecf8..0a225520 100644 --- a/tests/test_s3m.cpp +++ b/tests/test_s3m.cpp @@ -98,7 +98,7 @@ private: CPPUNIT_ASSERT(nullptr != p); CPPUNIT_ASSERT(nullptr != t); - CPPUNIT_ASSERT_EQUAL( 0, p->length()); + CPPUNIT_ASSERT_EQUAL( 0, p->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL( 0, p->bitrate()); CPPUNIT_ASSERT_EQUAL( 0, p->sampleRate()); CPPUNIT_ASSERT_EQUAL(16, p->channels()); diff --git a/tests/test_xm.cpp b/tests/test_xm.cpp index 33a74b71..76b88837 100644 --- a/tests/test_xm.cpp +++ b/tests/test_xm.cpp @@ -130,7 +130,7 @@ public: CPPUNIT_ASSERT(nullptr != p); CPPUNIT_ASSERT(nullptr != t); - CPPUNIT_ASSERT_EQUAL(0, p->length()); + CPPUNIT_ASSERT_EQUAL(0, p->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(0, p->bitrate()); CPPUNIT_ASSERT_EQUAL(0, p->sampleRate()); CPPUNIT_ASSERT_EQUAL(8, p->channels()); @@ -176,7 +176,7 @@ private: CPPUNIT_ASSERT(nullptr != p); CPPUNIT_ASSERT(nullptr != t); - CPPUNIT_ASSERT_EQUAL(0, p->length()); + CPPUNIT_ASSERT_EQUAL(0, p->lengthInSeconds()); CPPUNIT_ASSERT_EQUAL(0, p->bitrate()); CPPUNIT_ASSERT_EQUAL(0, p->sampleRate()); CPPUNIT_ASSERT_EQUAL(8, p->channels());