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

Commit 397962c1 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6309957 from 8d386f77 to rvc-release

Change-Id: Ied6c1626707dbc624032301489eb0ac6c99c4f14
parents e60d3ca5 8d386f77
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5710,7 +5710,10 @@ uint32_t AudioPolicyManager::setOutputDevices(const sp<SwAudioOutputDescriptor>&
            patchBuilder.addSink(filteredDevice);
        }

        installPatch(__func__, patchHandle, outputDesc.get(), patchBuilder.patch(), delayMs);
        // Add half reported latency to delayMs when muteWaitMs is null in order
        // to avoid disordered sequence of muting volume and changing devices.
        installPatch(__func__, patchHandle, outputDesc.get(), patchBuilder.patch(),
                muteWaitMs == 0 ? (delayMs + (outputDesc->latency() / 2)) : delayMs);
    }

    // update stream volumes according to new device