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

Skip to content
Commit f37f9980 authored by naoki miyazu's avatar naoki miyazu Committed by Andy Hung
Browse files

PatchTrack: Ensure enough data to write once

Underrun can occur for AudioPlaybackCapture
in the secondary PlaybackThread.

When the primary PlaybackThread is blocked by any reason
during playback, e.g. A2DP suspend, interceptBuffer is also
blocked and data will not be provided to the PatchRecord buffer.
But the secondary PlaybackThread is still running,
exhausting the data in the PatchTrack.

As mFillingUpStatus of the PatchTrack is still FS_ACTIVE,
the secondary PlaybackThread continues even though framesReady()
is not filled to threshold (mFrameCountToBeReady).
So, underrun happens repeatedly.

To avoid this issue, check if the PatchTrack has enough data in
releaseBuffer(); if not, change mFillingUpStatus to FS_FILLING,
and wait for the buffer to fill.

Bug: 144009535
Change-Id: Ifcbaea05228064284dfaa9b629c8860b1fbe977d
parent b1d2e747
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment