diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-04-28 05:30:48 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-04-28 05:30:48 +0000 |
| commit | 7ce39a16d12257b74dc205112901b24bda585185 (patch) | |
| tree | 6dad297c6ace9d7c58a81e069b9e927771ad6ae3 /src/plugins/Input/flac | |
| parent | 3f525068c53c3c7d505a3aaec1d209c9cf1101b9 (diff) | |
| download | qmmp-7ce39a16d12257b74dc205112901b24bda585185.tar.gz qmmp-7ce39a16d12257b74dc205112901b24bda585185.tar.bz2 qmmp-7ce39a16d12257b74dc205112901b24bda585185.zip | |
using read-only mode for ReplayGain
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6273 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/flac')
| -rw-r--r-- | src/plugins/Input/flac/replaygainreader.cpp | 15 |
1 files changed, 15 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()); } |
