audio flinger: shared audio record fixes
Fix several issues with shared audio record history implementation: - Resetting the shared audio package name when detroyinng a RecordTrack did not work because RecordThread::shareAudioHistory_l() bailed if the session ID was not specified: create a new method to reset the shared audio package and session explicitly. - RecordThread::getOldestFront_l() must not return a value lagging more than mRsmpInFrames behind mRsmpInRear because the caller does not check this condition and can reach outside of the buffer when copying data to newly allocated buffer. - Align RecordThread::shareAudioHistory_l() implementation with the API documentation that indicates best effort in providing history up to the specified start time: do not reject the request if the specified start time does not fit within the allocated buffer duratione but adjust the start time accordingly. Test: atest AudioRecordSharedAudioTest Bug: 192718483 Change-Id: Ib058d2180d16d380bbcb7c61fc7455b663bf1e6a
Loading
Please register or sign in to comment