Merge "Update the input duration to reduce the number of samples to process" into main am: 12086575b5
am: 7bcd9c7b13
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3125534 Change-Id: I1fe03ee78ea00e1faca8642b6902318eaab9c96c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
29e5340a69
4 changed files with 6 additions and 6 deletions
|
@ -114,7 +114,7 @@ class BassBoostEffectHelper : public EffectHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr int kSamplingFrequency = 44100;
|
static constexpr int kSamplingFrequency = 44100;
|
||||||
static constexpr int kDurationMilliSec = 2000;
|
static constexpr int kDurationMilliSec = 720;
|
||||||
static constexpr int kInputSize = kSamplingFrequency * kDurationMilliSec / 1000;
|
static constexpr int kInputSize = kSamplingFrequency * kDurationMilliSec / 1000;
|
||||||
long mInputFrameCount, mOutputFrameCount;
|
long mInputFrameCount, mOutputFrameCount;
|
||||||
std::shared_ptr<IFactory> mFactory;
|
std::shared_ptr<IFactory> mFactory;
|
||||||
|
@ -231,7 +231,7 @@ class BassBoostDataTest : public ::testing::TestWithParam<BassBoostDataTestParam
|
||||||
return gains[0] - gains[1];
|
return gains[0] - gains[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr int kNPointFFT = 32768;
|
static constexpr int kNPointFFT = 16384;
|
||||||
static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT;
|
static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT;
|
||||||
std::set<int> mStrengthValues;
|
std::set<int> mStrengthValues;
|
||||||
int32_t mChannelLayout;
|
int32_t mChannelLayout;
|
||||||
|
|
|
@ -82,7 +82,7 @@ class PresetReverbHelper : public EffectHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr int kSamplingFrequency = 44100;
|
static constexpr int kSamplingFrequency = 44100;
|
||||||
static constexpr int kDurationMilliSec = 2000;
|
static constexpr int kDurationMilliSec = 500;
|
||||||
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
|
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
|
||||||
int mStereoChannelCount =
|
int mStereoChannelCount =
|
||||||
getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
|
getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
|
||||||
|
|
|
@ -96,7 +96,7 @@ class VirtualizerHelper : public EffectHelper {
|
||||||
|
|
||||||
static constexpr int kSamplingFrequency = 44100;
|
static constexpr int kSamplingFrequency = 44100;
|
||||||
static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO;
|
static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO;
|
||||||
static constexpr int kDurationMilliSec = 2000;
|
static constexpr int kDurationMilliSec = 720;
|
||||||
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
|
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
|
||||||
int kChannelCount = getChannelCount(
|
int kChannelCount = getChannelCount(
|
||||||
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(kDefaultChannelLayout));
|
AudioChannelLayout::make<AudioChannelLayout::layoutMask>(kDefaultChannelLayout));
|
||||||
|
|
|
@ -94,7 +94,7 @@ class VolumeControlHelper : public EffectHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr int kSamplingFrequency = 44100;
|
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 kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
|
||||||
static constexpr int kMinLevel = -96;
|
static constexpr int kMinLevel = -96;
|
||||||
static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO;
|
static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO;
|
||||||
|
@ -180,7 +180,7 @@ class VolumeDataTest : public ::testing::TestWithParam<VolumeDataTestParam>,
|
||||||
const int kVsrApiLevel;
|
const int kVsrApiLevel;
|
||||||
static constexpr int kMaxAudioSample = 1;
|
static constexpr int kMaxAudioSample = 1;
|
||||||
static constexpr int kTransitionDuration = 300;
|
static constexpr int kTransitionDuration = 300;
|
||||||
static constexpr int kNPointFFT = 32768;
|
static constexpr int kNPointFFT = 16384;
|
||||||
static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT;
|
static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT;
|
||||||
static constexpr size_t offset = kSamplingFrequency * kTransitionDuration / 1000;
|
static constexpr size_t offset = kSamplingFrequency * kTransitionDuration / 1000;
|
||||||
static constexpr float kBaseLevel = 0;
|
static constexpr float kBaseLevel = 0;
|
||||||
|
|
Loading…
Reference in a new issue