Fix direct/offload AudoTrack playback head position on flush & re-use
AudioTrack: If the direct/offload track is flushed or stopped, the server render position may still be returning stale values because the HAL flush may not have executed yet. To honor the position reset on flush contract, return 0 when in flushed/stopped state consistently for all track types (direct and non-direct). DirectOutputThread: if previous track flush is pending while adding a new track for OffloadThread, issue the flush, even if the sessionId is the same, because the client will be expecting a reset frame count. Test: AudioTrackSurroundTest#testAC3PositionAfterFlushReleaseNewTrack passes reliably on AC3 MSD HAL enabled Cuttlefish Bug: 243899467 Change-Id: Ia2e8ca574a3c8063d14df9d86d3c6ea5c44ba3fb
Loading
Please register or sign in to comment