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

Commit 20de67d3 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AAC decoder reads default DRC effect type

Bug: 71430241
Test: cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestXheAac
      cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestAacDrc

Change-Id: I9b945e8195ba03ca3e0dee851b5f3ad399ba1dc9
parent 183eb5fb
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
#define PROP_DRC_OVERRIDE_BOOST      "aac_drc_boost"
#define PROP_DRC_OVERRIDE_HEAVY      "aac_drc_heavy"
#define PROP_DRC_OVERRIDE_ENC_LEVEL "aac_drc_enc_target_level"
#define PROP_DRC_OVERRIDE_EFFECT     "aac_drc_effect_type"
#define PROP_DRC_OVERRIDE_EFFECT     "ro.aac_drc_effect_type"

namespace android {

@@ -210,10 +210,8 @@ status_t SoftAAC2::initDecoder() {
        mDrcWrap.setParam(DRC_PRES_MODE_WRAP_ENCODER_TARGET, DRC_DEFAULT_MOBILE_ENC_LEVEL);
    }
    // AAC_UNIDRC_SET_EFFECT
    int32_t effectType = DRC_DEFAULT_MOBILE_DRC_EFFECT;
    // FIXME can't read default property for DRC effect type
    //int32_t effectType =
    //        property_get_int32(PROP_DRC_OVERRIDE_EFFECT, DRC_DEFAULT_MOBILE_DRC_EFFECT);
    int32_t effectType =
            property_get_int32(PROP_DRC_OVERRIDE_EFFECT, DRC_DEFAULT_MOBILE_DRC_EFFECT);
    if (effectType < -1 || effectType > 8) {
        effectType = DRC_DEFAULT_MOBILE_DRC_EFFECT;
    }