Skip to content

Commit f6172fa

Browse files
xt0032rusandi34
authored andcommitted
DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread
Bug: 24211743 Bug: 24267152 Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba (cherry picked from commit ab0ea0f)
1 parent e174797 commit f6172fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

services/audioflinger/Threads.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5223,6 +5223,7 @@ void AudioFlinger::RecordThread::readInputParameters()
52235223
mBufferSize = mInput->stream->common.get_buffer_size(&mInput->stream->common);
52245224
mFrameCount = mBufferSize / mFrameSize;
52255225
mRsmpInBuffer = new int16_t[mFrameCount * mChannelCount];
5226+
memset(mRsmpInBuffer, 0, mFrameCount * mChannelCount * sizeof(mRsmpInBuffer[0]));
52265227

52275228
if (mSampleRate != mReqSampleRate && mChannelCount <= FCC_2 && mReqChannelCount <= FCC_2)
52285229
{

0 commit comments

Comments
 (0)