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

Commit f42cede4 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Steve Kondik
Browse files

audio: Update anchor time only when sink start is successful

- During offload (WH) to non-offload fallback (BT),
  anchor time is getting updated incorrectly with
  offload renderer position when it tries to start
  sink using offload mode only.

- update anchor time post resume only when sink is
  started successfully.

Change-Id: I2c2992afa90506e08389226964b0bd5a5be07529
CRs-Fixed: 978596
parent e5c901e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1591,7 +1591,7 @@ void NuPlayer::Renderer::onResume() {
            notifyAudioTearDown();
        }
        //Update anchor time after resuming playback.
        if (offloadingAudio()) {
        if (offloadingAudio() && status == NO_ERROR) {
            int64_t nowUs = ALooper::GetNowUs();
            int64_t nowMediaUs =
                mAudioFirstAnchorTimeMediaUs + getPlayedOutAudioDurationUs(nowUs);