diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-02-16 11:49:36 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-02-16 11:49:36 +0000 |
| commit | e6cdd7a53803f700e7edaa5dea2b0876ada17114 (patch) | |
| tree | 903e398c1a49ef82bfcd33089d78c47c6c439726 /src/plugins/Input/flac/replaygainreader.cpp | |
| parent | 10204e543c9b32957205ce870f9a71f7b625065f (diff) | |
| download | qmmp-e6cdd7a53803f700e7edaa5dea2b0876ada17114.tar.gz qmmp-e6cdd7a53803f700e7edaa5dea2b0876ada17114.tar.bz2 qmmp-e6cdd7a53803f700e7edaa5dea2b0876ada17114.zip | |
added ogg flac support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1558 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/flac/replaygainreader.cpp')
| -rw-r--r-- | src/plugins/Input/flac/replaygainreader.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/plugins/Input/flac/replaygainreader.cpp b/src/plugins/Input/flac/replaygainreader.cpp index 27361e12b..1968ceb00 100644 --- a/src/plugins/Input/flac/replaygainreader.cpp +++ b/src/plugins/Input/flac/replaygainreader.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov * + * Copyright (C) 2009-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -22,13 +22,23 @@ #include <taglib/tag.h> #include <taglib/fileref.h> #include <taglib/flacfile.h> +#include <taglib/oggflacfile.h> #include "replaygainreader.h" ReplayGainReader::ReplayGainReader(const QString &path) { - TagLib::FLAC::File fileRef(path.toLocal8Bit ().constData()); - if(fileRef.xiphComment()) - readVorbisComment(fileRef.xiphComment()); + if(path.endsWith("*.flac")) + { + TagLib::FLAC::File fileRef(path.toLocal8Bit ().constData()); + if(fileRef.xiphComment()) + readVorbisComment(fileRef.xiphComment()); + } + else if(path.endsWith("*.oga")) + { + TagLib::Ogg::FLAC::File fileRef(path.toLocal8Bit ().constData()); + if(fileRef.tag()) + readVorbisComment(fileRef.tag()); + } } QMap <Qmmp::ReplayGainKey, double> ReplayGainReader::replayGainInfo() const |
