audio flinger: fix wraparound issues in AudioRecord shared audi history implementation
Fix issues with the implementation of the shared audio history record start
point in RecordThread input resampling buffer when indexes wrapround.
Bug: 185972521
Test: atest AudioRecordSharedAudioTest
Change-Id: Idcb664f1253b5a488991b39647c13087fc46b0c4
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 6549236..3e04804 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -2378,7 +2378,7 @@
audio_input_flags_t flags,
track_type type,
audio_port_handle_t portId,
- int64_t startTimeMs)
+ int32_t startFrames)
: TrackBase(thread, client, attr, sampleRate, format,
channelMask, frameCount, buffer, bufferSize, sessionId,
creatorPid,
@@ -2396,7 +2396,7 @@
mFlags(flags),
mSilenced(false),
mOpRecordAudioMonitor(OpRecordAudioMonitor::createIfNeeded(identity, attr)),
- mStartTimeMs(startTimeMs)
+ mStartFrames(startFrames)
{
if (mCblk == NULL) {
return;