1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 08:09:32 +02:00

Bug 1582 - Incorrect level shown in Mixer Board meter when track has positive gain

This commit is contained in:
James Crook 2019-07-22 12:11:38 +01:00
parent 43145e0a49
commit 1fde4eb7a4

View File

@ -636,14 +636,12 @@ 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;
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;
// Clip to [-1.0, 1.0] range.