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

Commit 002565a3 authored by Ivan Lozano's avatar Ivan Lozano Committed by Android (Google) Code Review
Browse files

Merge "Fix sanitizer in AudioFlinger threadLoop."

parents c8061784 ea04d391
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3319,7 +3319,7 @@ bool AudioFlinger::PlaybackThread::threadLoop()
                            lastWriteFinished,previousLastWriteFinished, &deltaNs);
                        const int32_t deltaMs = deltaNs / 1000000;

                        const int32_t throttleMs = mHalfBufferMs - deltaMs;
                        const int32_t throttleMs = (int32_t)mHalfBufferMs - deltaMs;
                        if ((signed)mHalfBufferMs >= throttleMs && throttleMs > 0) {
                            usleep(throttleMs * 1000);
                            // notify of throttle start on verbose log