diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/Input/flac/replaygainreader.cpp | 15 | ||||
| -rw-r--r-- | src/plugins/Input/mad/replaygainreader.cpp | 9 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/replaygainreader.cpp | 10 |
3 files changed, 34 insertions, 0 deletions
diff --git a/src/plugins/Input/flac/replaygainreader.cpp b/src/plugins/Input/flac/replaygainreader.cpp index 095e94fa9..b33dd0ffd 100644 --- a/src/plugins/Input/flac/replaygainreader.cpp +++ b/src/plugins/Input/flac/replaygainreader.cpp @@ -23,19 +23,34 @@ #include <taglib/fileref.h> #include <taglib/flacfile.h> #include <taglib/oggflacfile.h> +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) +#include <taglib/tfilestream.h> +#include <taglib/id3v2framefactory.h> +#endif #include "replaygainreader.h" ReplayGainReader::ReplayGainReader(const QString &path) { +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) + TagLib::FileStream stream(QStringToFileName(path), true); +#endif if(path.endsWith(".flac", Qt::CaseInsensitive)) { +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) + TagLib::FLAC::File fileRef(&stream, TagLib::ID3v2::FrameFactory::instance()); +#else TagLib::FLAC::File fileRef(QStringToFileName(path)); +#endif if(fileRef.xiphComment()) readVorbisComment(fileRef.xiphComment()); } else if(path.endsWith(".oga", Qt::CaseInsensitive)) { +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) + TagLib::Ogg::FLAC::File fileRef(&stream); +#else TagLib::Ogg::FLAC::File fileRef(QStringToFileName(path)); +#endif if(fileRef.tag()) readVorbisComment(fileRef.tag()); } diff --git a/src/plugins/Input/mad/replaygainreader.cpp b/src/plugins/Input/mad/replaygainreader.cpp index b8fac3ed4..fc8704a11 100644 --- a/src/plugins/Input/mad/replaygainreader.cpp +++ b/src/plugins/Input/mad/replaygainreader.cpp @@ -25,11 +25,20 @@ #include <taglib/id3v1tag.h> #include <taglib/id3v2header.h> #include <taglib/textidentificationframe.h> +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) +#include <taglib/tfilestream.h> +#include <taglib/id3v2framefactory.h> +#endif #include "replaygainreader.h" ReplayGainReader::ReplayGainReader(const QString &path) { +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) + TagLib::FileStream stream(QStringToFileName(path), true); + TagLib::MPEG::File fileRef(&stream, TagLib::ID3v2::FrameFactory::instance()); +#else TagLib::MPEG::File fileRef(QStringToFileName(path)); +#endif if(fileRef.ID3v2Tag()) readID3v2(fileRef.ID3v2Tag()); if(m_values.isEmpty() && fileRef.APETag()) diff --git a/src/plugins/Input/vorbis/replaygainreader.cpp b/src/plugins/Input/vorbis/replaygainreader.cpp index aac5957f5..b44f06b81 100644 --- a/src/plugins/Input/vorbis/replaygainreader.cpp +++ b/src/plugins/Input/vorbis/replaygainreader.cpp @@ -22,11 +22,21 @@ #include <taglib/tag.h> #include <taglib/fileref.h> #include <taglib/vorbisfile.h> +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) +#include <taglib/tfilestream.h> +#include <taglib/id3v2framefactory.h> +#endif #include "replaygainreader.h" ReplayGainReader::ReplayGainReader(const QString &path) { +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) + TagLib::FileStream stream(QStringToFileName(path), true); + TagLib::Ogg::Vorbis::File fileRef(&stream); +#else TagLib::Ogg::Vorbis::File fileRef(QStringToFileName(path)); +#endif + if(fileRef.tag()) readVorbisComment(fileRef.tag()); } |
