From a38b7fd691e3926e12a82b1c9ab83569e92d9f33 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 28 Jul 2019 19:18:59 +0000 Subject: fixed replaygain support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9019 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmp/qmmpaudioengine.cpp | 1 + src/qmmp/trackinfo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/qmmp/qmmpaudioengine.cpp b/src/qmmp/qmmpaudioengine.cpp index b1168b796..1bfddcf85 100644 --- a/src/qmmp/qmmpaudioengine.cpp +++ b/src/qmmp/qmmpaudioengine.cpp @@ -379,6 +379,7 @@ void QmmpAudioEngine::run() TrackInfo info(m_inputs[m_decoder]->path()); info.setValues(m); info.setValues(m_decoder->properties()); + info.setValues(m_decoder->replayGainInfo()); info.setDuration(m_decoder->totalTime()); if(StateHandler::instance()->dispatch(info)) m_trackInfo = QSharedPointer(new TrackInfo(info)); diff --git a/src/qmmp/trackinfo.cpp b/src/qmmp/trackinfo.cpp index f71affca0..e6887a76e 100644 --- a/src/qmmp/trackinfo.cpp +++ b/src/qmmp/trackinfo.cpp @@ -145,9 +145,9 @@ void TrackInfo::setValue(Qmmp::TrackProperty key, const QVariant &value) void TrackInfo::setValue(Qmmp::ReplayGainKey key, double value) { if(qFuzzyIsNull(value)) - m_replayGainInfo[key] = value; - else m_replayGainInfo.remove(key); + else + m_replayGainInfo[key] = value; m_replayGainInfo.isEmpty() ? (m_parts &= ~ReplayGainInfo) : (m_parts |= ReplayGainInfo); } -- cgit v1.2.3-13-gbd6f