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

Commit 4be3b831 authored by Andy Hung's avatar Andy Hung
Browse files

AudioTrack: Clear stream end flag on start

Improves readability of audioflinger dumpsys and allows
proper detection when the AudioTrack has finally stopped.

Test: NuPlayer with video clip in loop mode.
Bug: 32180119
Change-Id: I625efffdc2f589f4869ea76605b3ed90afce7e87
parent 52dd2e30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -607,7 +607,7 @@ status_t AudioTrack::start()
        mRefreshRemaining = true;
    }
    mNewPosition = mPosition + mUpdatePeriod;
    int32_t flags = android_atomic_and(~CBLK_DISABLED, &mCblk->mFlags);
    int32_t flags = android_atomic_and(~(CBLK_STREAM_END_DONE | CBLK_DISABLED), &mCblk->mFlags);

    status_t status = NO_ERROR;
    if (!(flags & CBLK_INVALID)) {