John Grossman
be02f32cff
TimedAudioTrack: Optimize the queue trim operation.
DO NOT MERGE this change must be hand-merged into master due to directory restructuring. Don't perform the end PTS calculation for each buffer during trimming. Instead, only calculate the ending PTS of a buffer if there is no next buffer in the queue. This optimization assumes that the buffers being queued are in monotonic media time order (a fair assumption for now) and that the timestamps in the audio are contiguous (not a requirement for this API, but a reality of how it is being used right now). In the case where the audio is discontinuous on purpose, it is that this optimization will cause the system hold one extra buffer which it could have safely trimmed. It should not be much of an issue since in real life the audio is almost always contiguous, and as long as the media clock is running and the mixer is mixing, the buffer will be used up and discard as part of the normal flow anyway. Change-Id: I00061e85ee7d5651fcf80751646c7d7415894a14 Signed-off-by: John Grossman <johngro@google.com>
…
…
…
…
…
…
…
…
…
…
…
…
…
…
Description
No description provided
Languages
Java
77.3%
Kotlin
9.2%
PowerBuilder
6.6%
C++
5.5%
AIDL
1%