Loading services/audioflinger/Threads.cpp +8 −5 Original line number Diff line number Diff line Loading @@ -5139,7 +5139,7 @@ reacquire_wakelock: sleepUs = kRecordThreadSleepUs; } if (framesRead <= 0) { continue; goto unlock; } ALOG_ASSERT(framesRead > 0); Loading @@ -5147,11 +5147,13 @@ reacquire_wakelock: (void) mTeeSink->write(&mRsmpInBuffer[rear * mChannelCount], framesRead); } // If destination is non-contiguous, we now correct for reading past end of buffer. { size_t part1 = mRsmpInFramesP2 - rear; if ((size_t) framesRead > part1) { memcpy(mRsmpInBuffer, &mRsmpInBuffer[mRsmpInFramesP2 * mChannelCount], (framesRead - part1) * mFrameSize); } } rear = mRsmpInRear += framesRead; size = activeTracks.size(); Loading Loading @@ -5358,6 +5360,7 @@ reacquire_wakelock: } unlock: // enable changes in effect chain unlockEffectChains(effectChains); // effectChains doesn't need to be cleared, since it is cleared by destructor at scope end Loading Loading
services/audioflinger/Threads.cpp +8 −5 Original line number Diff line number Diff line Loading @@ -5139,7 +5139,7 @@ reacquire_wakelock: sleepUs = kRecordThreadSleepUs; } if (framesRead <= 0) { continue; goto unlock; } ALOG_ASSERT(framesRead > 0); Loading @@ -5147,11 +5147,13 @@ reacquire_wakelock: (void) mTeeSink->write(&mRsmpInBuffer[rear * mChannelCount], framesRead); } // If destination is non-contiguous, we now correct for reading past end of buffer. { size_t part1 = mRsmpInFramesP2 - rear; if ((size_t) framesRead > part1) { memcpy(mRsmpInBuffer, &mRsmpInBuffer[mRsmpInFramesP2 * mChannelCount], (framesRead - part1) * mFrameSize); } } rear = mRsmpInRear += framesRead; size = activeTracks.size(); Loading Loading @@ -5358,6 +5360,7 @@ reacquire_wakelock: } unlock: // enable changes in effect chain unlockEffectChains(effectChains); // effectChains doesn't need to be cleared, since it is cleared by destructor at scope end Loading