From 1fde4eb7a4d4f41200c60a2c9b267fdc8256350f Mon Sep 17 00:00:00 2001 From: James Crook Date: Mon, 22 Jul 2019 12:11:38 +0100 Subject: [PATCH] Bug 1582 - Incorrect level shown in Mixer Board meter when track has positive gain --- src/MixerBoard.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp index df55d2220..48092e191 100644 --- a/src/MixerBoard.cpp +++ b/src/MixerBoard.cpp @@ -636,16 +636,14 @@ void MixerTrackCluster::UpdateMeter(const double t0, const double t1) { //vvv Need to apply envelope, too? See Mixer::MixSameRate. float gain = pTrack->GetChannelGain(0); - if (gain < 1.0) - for (unsigned int index = 0; index < nFrames; index++) - meterFloatsArray[2 * index] *= gain; + for (unsigned int index = 0; index < nFrames; index++) + meterFloatsArray[2 * index] *= gain; if (GetRight()) gain = GetRight()->GetChannelGain(1); else gain = pTrack->GetChannelGain(1); - if (gain < 1.0) - for (unsigned int index = 0; index < nFrames; index++) - meterFloatsArray[(2 * index) + 1] *= gain; + for (unsigned int index = 0; index < nFrames; index++) + meterFloatsArray[(2 * index) + 1] *= gain; // Clip to [-1.0, 1.0] range. for (unsigned int index = 0; index < 2 * nFrames; index++) if (meterFloatsArray[index] < -1.0)