Loading media/libaudioclient/AudioTrackShared.cpp +2 −5 Original line number Diff line number Diff line Loading @@ -900,11 +900,8 @@ size_t AudioTrackServerProxy::framesReady() } audio_track_cblk_t* cblk = mCblk; int32_t flush = cblk->u.mStreaming.mFlush; if (flush != mFlush) { // FIXME should return an accurate value, but over-estimate is better than under-estimate return mFrameCount; } flushBufferIfNeeded(); const int32_t rear = getRear(); ssize_t filled = audio_utils::safe_sub_overflow(rear, cblk->u.mStreaming.mFront); // pipe should not already be overfull Loading services/audioflinger/Tracks.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -954,6 +954,11 @@ status_t AudioFlinger::PlaybackThread::Track::start(AudioSystem::sync_event_t ev // initial state-stopping. next state-pausing. // What if resume is called ? if (state == FLUSHED) { // avoid underrun glitches when starting after flush reset(); } if (state == PAUSED || state == PAUSING) { if (mResumeToStopping) { // happened we need to resume to STOPPING_1 Loading Loading
media/libaudioclient/AudioTrackShared.cpp +2 −5 Original line number Diff line number Diff line Loading @@ -900,11 +900,8 @@ size_t AudioTrackServerProxy::framesReady() } audio_track_cblk_t* cblk = mCblk; int32_t flush = cblk->u.mStreaming.mFlush; if (flush != mFlush) { // FIXME should return an accurate value, but over-estimate is better than under-estimate return mFrameCount; } flushBufferIfNeeded(); const int32_t rear = getRear(); ssize_t filled = audio_utils::safe_sub_overflow(rear, cblk->u.mStreaming.mFront); // pipe should not already be overfull Loading
services/audioflinger/Tracks.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -954,6 +954,11 @@ status_t AudioFlinger::PlaybackThread::Track::start(AudioSystem::sync_event_t ev // initial state-stopping. next state-pausing. // What if resume is called ? if (state == FLUSHED) { // avoid underrun glitches when starting after flush reset(); } if (state == PAUSED || state == PAUSING) { if (mResumeToStopping) { // happened we need to resume to STOPPING_1 Loading