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

Commit ab0ea0fe authored by Andy Hung's avatar Andy Hung
Browse files

DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread

Bug: 24211743
Bug: 24267152
Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba
parent 6272fa1b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5223,6 +5223,7 @@ void AudioFlinger::RecordThread::readInputParameters()
    mBufferSize = mInput->stream->common.get_buffer_size(&mInput->stream->common);
    mFrameCount = mBufferSize / mFrameSize;
    mRsmpInBuffer = new int16_t[mFrameCount * mChannelCount];
    memset(mRsmpInBuffer, 0, mFrameCount * mChannelCount * sizeof(mRsmpInBuffer[0]));

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