aaudio: rename timestamp variables
There were several different timestamp variables with slightly
different meaning but with the same name.
That made it hard to debug the code.
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: Iebf438676925c698377abe02c81f3d559829318a
diff --git a/services/oboeservice/AAudioServiceStreamShared.cpp b/services/oboeservice/AAudioServiceStreamShared.cpp
index d5450fe..14742dd 100644
--- a/services/oboeservice/AAudioServiceStreamShared.cpp
+++ b/services/oboeservice/AAudioServiceStreamShared.cpp
@@ -238,15 +238,15 @@
}
void AAudioServiceStreamShared::markTransferTime(Timestamp ×tamp) {
- mAtomicTimestamp.write(timestamp);
+ mAtomicStreamTimestamp.write(timestamp);
}
// Get timestamp that was written by mixer or distributor.
aaudio_result_t AAudioServiceStreamShared::getFreeRunningPosition(int64_t *positionFrames,
int64_t *timeNanos) {
// TODO Get presentation timestamp from the HAL
- if (mAtomicTimestamp.isValid()) {
- Timestamp timestamp = mAtomicTimestamp.read();
+ if (mAtomicStreamTimestamp.isValid()) {
+ Timestamp timestamp = mAtomicStreamTimestamp.read();
*positionFrames = timestamp.getPosition();
*timeNanos = timestamp.getNanoseconds();
return AAUDIO_OK;