diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-12-27 10:21:26 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-12-27 10:21:26 +0000 |
| commit | 9dfbc84364ebb83fe318ddacdf1d9ad49e21671f (patch) | |
| tree | 891d6d9298c708cdadcf6f86f23fd09ff17f9f7b /src/plugins/Input/mad/decodermadfactory.cpp | |
| parent | b44a0720afd1c6796ae571cb7b45fe1b12cfa177 (diff) | |
| download | qmmp-9dfbc84364ebb83fe318ddacdf1d9ad49e21671f.tar.gz qmmp-9dfbc84364ebb83fe318ddacdf1d9ad49e21671f.tar.bz2 qmmp-9dfbc84364ebb83fe318ddacdf1d9ad49e21671f.zip | |
ogg vorbis plugin: added replay gain support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1457 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mad/decodermadfactory.cpp')
| -rw-r--r-- | src/plugins/Input/mad/decodermadfactory.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index 2ec86e011..2a7df8189 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -31,6 +31,7 @@ #include <taglib/tfile.h> #include <taglib/mpegfile.h> #include "mpegmetadatamodel.h" +#include "replaygainreader.h" #include "settingsdialog.h" #include "decoder_mad.h" #include "decodermadfactory.h" @@ -95,7 +96,13 @@ const DecoderProperties DecoderMADFactory::properties() const Decoder *DecoderMADFactory::create(const QString &url, QIODevice *input) { - return new DecoderMAD(url, input); + Decoder *d = new DecoderMAD(input); + if(!url.contains("://")) //local file + { + ReplayGainReader rg(url); + d->setReplayGainInfo(rg.replayGainInfo()); + } + return d; } QList<FileInfo *> DecoderMADFactory::createPlayList(const QString &fileName, bool useMetaData) |
