diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp index b82bde114b..360bf2671f 100644 --- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp +++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp @@ -138,7 +138,6 @@ class DownmixEffectHelper : public EffectHelper { void setDataTestParams(int32_t layoutType) { mInputBuffer.resize(kBufferSize); - mOutputBuffer.resize(kBufferSize); // Get the number of channels used mInputChannelCount = getChannelCount( @@ -146,6 +145,7 @@ class DownmixEffectHelper : public EffectHelper { // In case of downmix, output is always configured to stereo layout. mOutputBufferSize = (mInputBuffer.size() / mInputChannelCount) * kOutputChannelCount; + mOutputBuffer.resize(mOutputBufferSize); } // Generate mInputBuffer values between -kMaxDownmixSample to kMaxDownmixSample @@ -262,13 +262,13 @@ class DownmixFoldDataTest : public ::testing::TestWithParam