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

Commit 74e43c26 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "BassBoost : Add minimum and maximum capabilities for params."

parents e728b4ce 6aa9fb6e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -498,8 +498,7 @@ RetCode BundleContext::updateControlParameter(const std::vector<Equalizer::BandL
}

RetCode BundleContext::setBassBoostStrength(int strength) {
    if (strength < BassBoost::MIN_PER_MILLE_STRENGTH ||
        strength > BassBoost::MAX_PER_MILLE_STRENGTH) {
    if (strength < 0 || strength > lvm::kBassBoostCap.maxStrengthPm) {
        LOG(ERROR) << __func__ << " invalid strength: " << strength;
        return RetCode::ERROR_ILLEGAL_PARAMETER;
    }
+2 −1
Original line number Diff line number Diff line
@@ -85,7 +85,8 @@ static const Descriptor kEqualizerDesc = {

static const bool mStrengthSupported = true;

static const BassBoost::Capability kBassBoostCap = {.strengthSupported = mStrengthSupported};
static const BassBoost::Capability kBassBoostCap = {.maxStrengthPm = 1000,
                                                    .strengthSupported = mStrengthSupported};

static const std::string kBassBoostEffectName = "Dynamic Bass Boost";