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

Commit 98c3afea authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT."

parents b669b18d ecf9c922
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1843,7 +1843,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,