Fix master channel peak display

Fix #1427

Conflicts:

	src/core/FxMixer.cpp
	src/gui/FxMixerView.cpp
This commit is contained in:
Vesa
2014-12-10 01:28:14 +02:00
parent 891ab058eb
commit 4a6257a47c
2 changed files with 5 additions and 3 deletions

View File

@@ -514,9 +514,6 @@ void FxMixer::masterMix( sampleFrame * _buf )
const float v = m_fxChannels[0]->m_volumeModel.value();
MixHelpers::addSanitizedMultiplied( _buf, m_fxChannels[0]->m_buffer, v, fpp );
m_fxChannels[0]->m_peakLeft *= engine::mixer()->masterGain();
m_fxChannels[0]->m_peakRight *= engine::mixer()->masterGain();
// clear all channel buffers and
// reset channel process state
for( int i = 0; i < numChannels(); ++i)

View File

@@ -480,6 +480,11 @@ void FxMixerView::clear()
void FxMixerView::updateFaders()
{
FxMixer * m = engine::fxMixer();
// apply master gain
m->m_fxChannels[0]->m_peakLeft *= engine::mixer()->masterGain();
m->m_fxChannels[0]->m_peakRight *= engine::mixer()->masterGain();
for( int i = 0; i < m_fxChannelViews.size(); ++i )
{
const float opl = m_fxChannelViews[i]->m_fader->getPeak_L();