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

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

Merge "Fix record memory buffer allocation for legacy upmix/downmix" into mnc-dev

parents 70c1f74f a97630bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6651,7 +6651,7 @@ status_t AudioFlinger::RecordThread::RecordBufferConverter::updateParameters(
    if (mResampler != NULL) {
        mBufFrameSize = max(mSrcChannelCount, FCC_2)
                * audio_bytes_per_sample(AUDIO_FORMAT_PCM_FLOAT);
    } else if ((mIsLegacyUpmix || mIsLegacyDownmix) && mDstFormat != AUDIO_FORMAT_PCM_FLOAT) {
    } else if (mIsLegacyUpmix || mIsLegacyDownmix) { // legacy modes always float
        mBufFrameSize = mDstChannelCount * audio_bytes_per_sample(AUDIO_FORMAT_PCM_FLOAT);
    } else if (mSrcChannelMask != mDstChannelMask && mDstFormat != mSrcFormat) {
        mBufFrameSize = mDstChannelCount * audio_bytes_per_sample(mSrcFormat);