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

Commit efddbd12 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9642788 from 9c762cde to udc-release

Change-Id: If5c7e29e9f221b272b4c1c4168dcd09393cd4182
parents 81b5adf5 9c762cde
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ union EnvironmentalReverb {
  int roomHfLevelMb;
  int decayTimeMs;
  int decayHfRatioPm;
  int reflectionsLevelMb;
  int reflectionsDelayMs;
  int levelMb;
  int delayMs;
  int diffusionPm;
+8 −0
Original line number Diff line number Diff line
@@ -58,6 +58,14 @@ union EnvironmentalReverb {
     * HF decay ratio in permilles.
     */
    int decayHfRatioPm;
    /**
     * Reverb reflections level in millibels.
     */
    int reflectionsLevelMb;
    /**
     * Reverb reflections delay in milliseconds.
     */
    int reflectionsDelayMs;
    /**
     * Reverb level in millibels.
     */
+24 −0
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ const std::vector<Range::EnvironmentalReverbRange> EnvReverbSw::kRanges = {
        MAKE_RANGE(EnvironmentalReverb, roomHfLevelMb, -4000, 0),
        MAKE_RANGE(EnvironmentalReverb, decayTimeMs, 0, 7000),
        MAKE_RANGE(EnvironmentalReverb, decayHfRatioPm, 100, 2000),
        MAKE_RANGE(EnvironmentalReverb, reflectionsLevelMb, -6000, 0),
        MAKE_RANGE(EnvironmentalReverb, reflectionsDelayMs, 0, 65),
        MAKE_RANGE(EnvironmentalReverb, levelMb, -6000, 0),
        MAKE_RANGE(EnvironmentalReverb, delayMs, 0, 65),
        MAKE_RANGE(EnvironmentalReverb, diffusionPm, 0, 1000),
@@ -125,6 +127,20 @@ ndk::ScopedAStatus EnvReverbSw::setParameterSpecific(const Parameter::Specific&
                    EX_ILLEGAL_ARGUMENT, "setDecayHfRatioFailed");
            return ndk::ScopedAStatus::ok();
        }
        case EnvironmentalReverb::reflectionsLevelMb: {
            RETURN_IF(mContext->setErReflectionsLevel(
                              erParam.get<EnvironmentalReverb::reflectionsLevelMb>()) !=
                              RetCode::SUCCESS,
                      EX_ILLEGAL_ARGUMENT, "setReflectionsLevelFailed");
            return ndk::ScopedAStatus::ok();
        }
        case EnvironmentalReverb::reflectionsDelayMs: {
            RETURN_IF(mContext->setErReflectionsDelay(
                              erParam.get<EnvironmentalReverb::reflectionsDelayMs>()) !=
                              RetCode::SUCCESS,
                      EX_ILLEGAL_ARGUMENT, "setReflectionsDelayFailed");
            return ndk::ScopedAStatus::ok();
        }
        case EnvironmentalReverb::levelMb: {
            RETURN_IF(mContext->setErLevel(erParam.get<EnvironmentalReverb::levelMb>()) !=
                              RetCode::SUCCESS,
@@ -201,6 +217,14 @@ ndk::ScopedAStatus EnvReverbSw::getParameterEnvironmentalReverb(const Environmen
            erParam.set<EnvironmentalReverb::decayHfRatioPm>(mContext->getErDecayHfRatio());
            break;
        }
        case EnvironmentalReverb::reflectionsLevelMb: {
            erParam.set<EnvironmentalReverb::reflectionsLevelMb>(mContext->getErReflectionsLevel());
            break;
        }
        case EnvironmentalReverb::reflectionsDelayMs: {
            erParam.set<EnvironmentalReverb::reflectionsDelayMs>(mContext->getErReflectionsDelay());
            break;
        }
        case EnvironmentalReverb::levelMb: {
            erParam.set<EnvironmentalReverb::levelMb>(mContext->getErLevel());
            break;
+14 −1
Original line number Diff line number Diff line
@@ -58,12 +58,23 @@ class EnvReverbSwContext final : public EffectContext {
    int getErDensity() const { return mDensity; }

    RetCode setErBypass(bool bypass) {
        // TODO : Add implementation to apply new bypass
        mBypass = bypass;
        return RetCode::SUCCESS;
    }
    bool getErBypass() const { return mBypass; }

    RetCode setErReflectionsDelay(int delay) {
        mReflectionsDelayMs = delay;
        return RetCode::SUCCESS;
    }
    bool getErReflectionsDelay() const { return mReflectionsDelayMs; }

    RetCode setErReflectionsLevel(int level) {
        mReflectionsLevelMb = level;
        return RetCode::SUCCESS;
    }
    bool getErReflectionsLevel() const { return mReflectionsLevelMb; }

  private:
    int mRoomLevel = -6000;                                        // Default room level
    int mRoomHfLevel = 0;                                          // Default room hf level
@@ -71,6 +82,8 @@ class EnvReverbSwContext final : public EffectContext {
    int mDecayHfRatio = 500;                                       // Default decay hf ratio
    int mLevel = -6000;                                            // Default level
    int mDelay = 40;                                               // Default delay
    int mReflectionsLevelMb = 0;
    int mReflectionsDelayMs = 0;
    int mDiffusion = 1000;                                         // Default diffusion
    int mDensity = 1000;                                           // Default density
    bool mBypass = false;                                          // Default bypass
+6 −6
Original line number Diff line number Diff line
@@ -273,12 +273,12 @@ static const AudioUuid kVirtualizerProxyUUID = {static_cast<int32_t>(0xd3467faa)
                                                0x4d34,
                                                0xacaf,
                                                {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
// fa819f3e-588b-11ed-9b6a-0242ac120002
static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xfa819f3e),
                                              0x588b,
                                              0x11ed,
                                              0x9b6a,
                                              {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
// e46b26a0-dddd-11db-8afd-0002a5d5c51b
static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xe46b26a0),
                                              0xdddd,
                                              0x11db,
                                              0x8afd,
                                              {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
// fa81a0f6-588b-11ed-9b6a-0242ac120002
static const AudioUuid kVisualizerSwImplUUID = {static_cast<int32_t>(0xfa81a0f6),
                                                0x588b,
Loading