aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qmmp/qmmpaudioengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qmmp/qmmpaudioengine.cpp b/src/qmmp/qmmpaudioengine.cpp
index 505d148e9..e43b9da8f 100644
--- a/src/qmmp/qmmpaudioengine.cpp
+++ b/src/qmmp/qmmpaudioengine.cpp
@@ -357,7 +357,6 @@ void QmmpAudioEngine::run()
}
m_decoder = m_decoders.dequeue();
addOffset(); //offset
- m_replayGain->setReplayGainInfo(m_decoder->replayGainInfo());
mutex()->unlock();
m_output->start();
StateHandler::instance()->dispatch(Qmmp::Buffering);
@@ -444,7 +443,6 @@ void QmmpAudioEngine::run()
m_decoder = m_decoders.dequeue();
//m_seekTime = m_inputs.value(m_decoder)->offset();
flush(true);
- m_replayGain->setReplayGainInfo(m_decoder->replayGainInfo());
//use current output if possible
prepareEffects(m_decoder);
if(m_ap == m_output->audioParameters())
@@ -619,8 +617,6 @@ void QmmpAudioEngine::prepareEffects(Decoder *d)
{
m_effects.removeAll(e);
m_blockedEffects.removeAll(e);
- if(m_replayGain != e)
- delete e;
}
}
m_replayGain = 0;
@@ -632,7 +628,11 @@ void QmmpAudioEngine::prepareEffects(Decoder *d)
m_replayGain = new ReplayGain();
m_replayGain->configure(m_ap.sampleRate(), m_ap.channelMap());
m_effects << m_replayGain;
- updateReplayGainSettings();
+ m_replayGain->setReplayGainInfo(d->replayGainInfo());
+ m_replayGain->updateSettings(m_settings->replayGainMode(),
+ m_settings->replayGainPreamp(),
+ m_settings->replayGainDefaultGain(),
+ m_settings->replayGainPreventClipping());
}
//channel order converter
if(m_ap.channelMap() != m_ap.channelMap().remaped())