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

Commit 8ff50e75 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Use uint32_t sequence numbers for IAudioRecord

This makes it the same as for IAudioTrack.

Previously we had a mix of int, int32_t and uint32_t,
which could cause comparisons to fail.

Change-Id: Ic72ef650ee81f65db11e42ed16d818fdf3e310f4
parent a238b9b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ private:
    // These are private to processAudioBuffer(), and are not protected by a lock
    uint32_t                mRemainingFrames;       // number of frames to request in obtainBuffer()
    bool                    mRetryOnPartialBuffer;  // sleep and retry after partial obtainBuffer()
    int                     mObservedSequence;      // last observed value of mSequence
    uint32_t                mObservedSequence;      // last observed value of mSequence

    uint32_t                mMarkerPosition;    // in wrapping (overflow) frame units
    bool                    mMarkerReached;
+1 −1
Original line number Diff line number Diff line
@@ -767,7 +767,7 @@ nsecs_t AudioRecord::processAudioBuffer()
        mRetryOnPartialBuffer = false;
    }
    size_t misalignment = mProxy->getMisalignment();
    int32_t sequence = mSequence;
    uint32_t sequence = mSequence;

    // These fields don't need to be cached, because they are assigned only by set():
    //      mTransfer, mCbf, mUserData, mSampleRate