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

Commit 50d621f4 authored by liuxiaoyu7's avatar liuxiaoyu7 Committed by Phil Burk
Browse files

audio:fix audio stream issue.



audio stream maybe closed when playerSetVolume from Iplayer.

Bug: 213397636
Test: atest AAudioTests
Signed-off-by: default avatarliuxiaoyu7 <liuxiaoyu7@xiaomi.com>
Change-Id: I866fbb6ee4452372d6bedab44345de28fdadda7f
Merged-In: I866fbb6ee4452372d6bedab44345de28fdadda7f
(cherry picked from commit 667374a4)
parent 65cef33d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -602,6 +602,7 @@ bool AudioStream::collidesWithCallback() const {

void AudioStream::setDuckAndMuteVolume(float duckAndMuteVolume) {
    ALOGD("%s() to %f", __func__, duckAndMuteVolume);
    std::lock_guard<std::mutex> lock(mStreamLock);
    mDuckAndMuteVolume = duckAndMuteVolume;
    doSetVolume(); // apply this change
}