From a9171f9d8d2fe821389406da01eebc6840aad52b Mon Sep 17 00:00:00 2001 From: Sneha Patil Date: Thu, 6 Jun 2024 09:42:39 +0000 Subject: [PATCH] Update the input duration to reduce the number of samples to process Bug: 305866207 Test: atest VtsHalBassBoostTargetTest atest VtsHalVolumeTargetTest atest VtsHalVirtualizerTargetTest atest VtsHalPresetReverbTargetTest Change-Id: I6dc4fa6006634e570d075f8099401bd3dc572da1 --- audio/aidl/vts/VtsHalBassBoostTargetTest.cpp | 4 ++-- audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp | 2 +- audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp | 2 +- audio/aidl/vts/VtsHalVolumeTargetTest.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp index abc5a915a6..5ce2a20603 100644 --- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp +++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp @@ -114,7 +114,7 @@ class BassBoostEffectHelper : public EffectHelper { } static constexpr int kSamplingFrequency = 44100; - static constexpr int kDurationMilliSec = 2000; + static constexpr int kDurationMilliSec = 720; static constexpr int kInputSize = kSamplingFrequency * kDurationMilliSec / 1000; long mInputFrameCount, mOutputFrameCount; std::shared_ptr mFactory; @@ -231,7 +231,7 @@ class BassBoostDataTest : public ::testing::TestWithParam mStrengthValues; int32_t mChannelLayout; diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp index 2229ff837a..542f0d8d40 100644 --- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp +++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp @@ -82,7 +82,7 @@ class PresetReverbHelper : public EffectHelper { } static constexpr int kSamplingFrequency = 44100; - static constexpr int kDurationMilliSec = 2000; + static constexpr int kDurationMilliSec = 500; static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000; int mStereoChannelCount = getChannelCount(AudioChannelLayout::make( diff --git a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp index f121f7c8c6..b449f3c192 100644 --- a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp +++ b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp @@ -96,7 +96,7 @@ class VirtualizerHelper : public EffectHelper { static constexpr int kSamplingFrequency = 44100; static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO; - static constexpr int kDurationMilliSec = 2000; + static constexpr int kDurationMilliSec = 720; static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000; int kChannelCount = getChannelCount( AudioChannelLayout::make(kDefaultChannelLayout)); diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp index db2f4a9625..5930dcf2b8 100644 --- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp +++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp @@ -94,7 +94,7 @@ class VolumeControlHelper : public EffectHelper { } static constexpr int kSamplingFrequency = 44100; - static constexpr int kDurationMilliSec = 2000; + static constexpr int kDurationMilliSec = 720; static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000; static constexpr int kMinLevel = -96; static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO; @@ -174,7 +174,7 @@ class VolumeDataTest : public ::testing::TestWithParam, static constexpr int kMaxAudioSample = 1; static constexpr int kTransitionDuration = 300; - static constexpr int kNPointFFT = 32768; + static constexpr int kNPointFFT = 16384; static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT; static constexpr size_t offset = kSamplingFrequency * kTransitionDuration / 1000; static constexpr float kBaseLevel = 0;