Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5deda0e7 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

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

parents ee5201b4 13969262
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -1279,7 +1279,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;
    }
}