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

Commit 0b6bbcf0 authored by Andy Hung's avatar Andy Hung
Browse files

Fix divide by zero exception with default sampleRate of 0

Bug: 27827281
Change-Id: I6cd03712c64bee3582ba0c5be7d5d3035c4861c1
parent 5a898236
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ status_t AudioRecord::set(
    mActive = false;
    mUserData = user;
    // TODO: add audio hardware input latency here
    mLatency = (1000*mFrameCount) / sampleRate;
    mLatency = (1000 * mFrameCount) / mSampleRate;
    mMarkerPosition = 0;
    mMarkerReached = false;
    mNewPosition = 0;