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

Commit cfda8c43 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT." into mnc-dr-dev

parents 95c3a43a 39609a0a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1852,7 +1852,11 @@ nsecs_t AudioTrack::processAudioBuffer()
        case NO_ERROR:
        case DEAD_OBJECT:
        case TIMED_OUT:
            if (status != DEAD_OBJECT) {
                // for DEAD_OBJECT, we do not send a EVENT_STREAM_END after stop();
                // instead, the application should handle the EVENT_NEW_IAUDIOTRACK.
                mCbf(EVENT_STREAM_END, mUserData, NULL);
            }
            {
                AutoMutex lock(mLock);
                // The previously assigned value of waitStreamEnd is no longer valid,