Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59843130 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "disable audio balance in voip call for mono channel" into udc-dev am: c269d3d8

parents 10f19919 c269d3d8
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -6486,9 +6486,13 @@ void AudioFlinger::DirectOutputThread::processVolume_l(Track *track, bool lastTr
        if (right > GAIN_FLOAT_UNITY) {
            right = GAIN_FLOAT_UNITY;
        }

        left *= v * mMasterBalanceLeft; // DirectOutputThread balance applied as track volume
        right *= v * mMasterBalanceRight;
        left *= v;
        right *= v;
        if (mAudioFlinger->getMode() != AUDIO_MODE_IN_COMMUNICATION
                || audio_channel_count_from_out_mask(mChannelMask) > 1) {
            left *= mMasterBalanceLeft; // DirectOutputThread balance applied as track volume
            right *= mMasterBalanceRight;
        }
    }

    track->processMuteEvent_l(mAudioFlinger->getOrCreateAudioManager(),