aaudio: minor cleanup in clock model
Init mMaxMeasuredLatenessNanos
Use default destructor.
Bug: 137009840
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: Ia9b42e4754047f5e87205c4adbc3329a1b96e74b
diff --git a/media/libaaudio/src/client/IsochronousClockModel.cpp b/media/libaaudio/src/client/IsochronousClockModel.cpp
index bd46d05..f0dcd44 100644
--- a/media/libaaudio/src/client/IsochronousClockModel.cpp
+++ b/media/libaaudio/src/client/IsochronousClockModel.cpp
@@ -47,6 +47,7 @@
, mMarkerNanoTime(0)
, mSampleRate(48000)
, mFramesPerBurst(48)
+ , mBurstPeriodNanos(0) // this will be updated before use
, mMaxMeasuredLatenessNanos(0)
, mLatenessForDriftNanos(kInitialLatenessForDriftNanos)
, mState(STATE_STOPPED)
@@ -57,9 +58,6 @@
}
}
-IsochronousClockModel::~IsochronousClockModel() {
-}
-
void IsochronousClockModel::setPositionAndTime(int64_t framePosition, int64_t nanoTime) {
ALOGV("setPositionAndTime, %lld, %lld", (long long) framePosition, (long long) nanoTime);
mMarkerFramePosition = framePosition;
@@ -186,7 +184,7 @@
// Calculate upper region that will trigger a drift forwards.
mLatenessForDriftNanos = mMaxMeasuredLatenessNanos - (mMaxMeasuredLatenessNanos >> 4);
} else { // decrease
- // If these is an outlier in lateness then mMaxMeasuredLatenessNanos can go high
+ // If this is an outlier in lateness then mMaxMeasuredLatenessNanos can go high
// and stay there. So we slowly reduce mMaxMeasuredLatenessNanos for better
// long term stability. The two opposing forces will keep mMaxMeasuredLatenessNanos
// within a reasonable range.