Merge "AudioTrack, AudioRecord: Fix latency computation" into oc-mr1-dev am: 5deda0e784

am: c0e75a7d57

Change-Id: I1f95a6372752e2e47e7f022db0333517c387eadf
gugelfrei
Andy Hung 7 years ago committed by android-build-merger
commit f89090e284

@ -274,7 +274,7 @@ status_t AudioRecord::set(
mStatus = NO_ERROR;
mUserData = user;
// TODO: add audio hardware input latency here
mLatency = (1000 * mFrameCount) / mSampleRate;
mLatency = (1000LL * mFrameCount) / mSampleRate;
mMarkerPosition = 0;
mMarkerReached = false;
mNewPosition = 0;

@ -1281,7 +1281,7 @@ void AudioTrack::updateLatency_l()
ALOGW("getLatency(%d) failed status %d", mOutput, status);
} else {
// FIXME don't believe this lie
mLatency = mAfLatency + (1000 * mFrameCount) / mSampleRate;
mLatency = mAfLatency + (1000LL * mFrameCount) / mSampleRate;
}
}

Loading…
Cancel
Save