Loading media/libeffects/loudness/aidl/EffectLoudnessEnhancer.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "EffectLoudnessEnhancer.h" using aidl::android::hardware::audio::common::getChannelCount; using aidl::android::hardware::audio::effect::Descriptor; using aidl::android::hardware::audio::effect::getEffectImplUuidLoudnessEnhancer; using aidl::android::hardware::audio::effect::getEffectTypeUuidLoudnessEnhancer; Loading Loading @@ -138,6 +139,11 @@ std::shared_ptr<EffectContext> LoudnessEnhancerImpl::createContext( LOG(DEBUG) << __func__ << " context already exist"; return mContext; } if (2 < getChannelCount(common.input.base.channelMask)) { LOG(ERROR) << __func__ << " channelCount not supported: " << common.input.base.channelMask.toString(); return nullptr; } mContext = std::make_shared<LoudnessEnhancerContext>(1 /* statusFmqDepth */, common); return mContext; Loading media/libeffects/loudness/aidl/LoudnessEnhancerContext.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -102,10 +102,6 @@ IEffect::Status LoudnessEnhancerContext::process(float* in, float* out, int samp } void LoudnessEnhancerContext::init_params() { int channelCount = ::aidl::android::hardware::audio::common::getChannelCount( mCommon.input.base.channelMask); LOG_ALWAYS_FATAL_IF(channelCount != 2, "channel count %d not supported", channelCount); mGain = LOUDNESS_ENHANCER_DEFAULT_TARGET_GAIN_MB; float targetAmp = pow(10, mGain / 2000.0f); // mB to linear amplification LOG(VERBOSE) << __func__ << "Target gain = " << mGain << "mB <=> factor = " << targetAmp; Loading Loading
media/libeffects/loudness/aidl/EffectLoudnessEnhancer.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "EffectLoudnessEnhancer.h" using aidl::android::hardware::audio::common::getChannelCount; using aidl::android::hardware::audio::effect::Descriptor; using aidl::android::hardware::audio::effect::getEffectImplUuidLoudnessEnhancer; using aidl::android::hardware::audio::effect::getEffectTypeUuidLoudnessEnhancer; Loading Loading @@ -138,6 +139,11 @@ std::shared_ptr<EffectContext> LoudnessEnhancerImpl::createContext( LOG(DEBUG) << __func__ << " context already exist"; return mContext; } if (2 < getChannelCount(common.input.base.channelMask)) { LOG(ERROR) << __func__ << " channelCount not supported: " << common.input.base.channelMask.toString(); return nullptr; } mContext = std::make_shared<LoudnessEnhancerContext>(1 /* statusFmqDepth */, common); return mContext; Loading
media/libeffects/loudness/aidl/LoudnessEnhancerContext.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -102,10 +102,6 @@ IEffect::Status LoudnessEnhancerContext::process(float* in, float* out, int samp } void LoudnessEnhancerContext::init_params() { int channelCount = ::aidl::android::hardware::audio::common::getChannelCount( mCommon.input.base.channelMask); LOG_ALWAYS_FATAL_IF(channelCount != 2, "channel count %d not supported", channelCount); mGain = LOUDNESS_ENHANCER_DEFAULT_TARGET_GAIN_MB; float targetAmp = pow(10, mGain / 2000.0f); // mB to linear amplification LOG(VERBOSE) << __func__ << "Target gain = " << mGain << "mB <=> factor = " << targetAmp; Loading