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

Commit a5ed48d3 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Move initialization of mRefreshRemaining to match AudioTrack

This also fixes a bug where, for a re-created IAudioRecord,
mRefreshRemaining was not being reset correctly.

Change-Id: I9f721a4edf92aab859cf3f247ab7f65562d14fb0
parent 591d9a36
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -256,7 +256,6 @@ status_t AudioRecord::set(

    mActive = false;
    mCbf = cbf;
    mRefreshRemaining = true;
    mUserData = user;
    // TODO: add audio hardware input latency here
    mLatency = (1000*mFrameCount) / sampleRate;
@@ -538,6 +537,8 @@ status_t AudioRecord::openRecord_l(size_t epoch)
        }
    }

    mRefreshRemaining = true;

    // starting address of buffers in shared memory
    void *buffers = (char*)cblk + sizeof(audio_track_cblk_t);