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/Threads.h b/services/audioflinger/Threads.h
index 03ed6fd..b6f7f24 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -1863,7 +1863,7 @@
DeviceDescriptorBaseVector mOutDevices;
std::string mSharedAudioPackageName = {};
- long mSharedAudioStartMs = 0;
+ int32_t mSharedAudioStartFrames = -1;
audio_session_t mSharedAudioSessionId = AUDIO_SESSION_NONE;
};