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

Commit 5aff90a6 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am 1aaba885: Merge "Audio Effects: fixed "strength supported" parameter size." into gingerbread

Merge commit '1aaba885' into gingerbread-plus-aosp

* commit '1aaba885':
  Audio Effects: fixed "strength supported" parameter size.
parents 821afa9a 1aaba885
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ public class BassBoost extends AudioEffect {
           UnsupportedOperationException, RuntimeException {
           UnsupportedOperationException, RuntimeException {
        super(EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_NULL, priority, audioSession);
        super(EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_NULL, priority, audioSession);


        short[] value = new short[1];
        int[] value = new int[1];
        checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
        checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
        mStrengthSupported = (value[0] != 0);
        mStrengthSupported = (value[0] != 0);
    }
    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -100,7 +100,7 @@ public class Virtualizer extends AudioEffect {
           UnsupportedOperationException, RuntimeException {
           UnsupportedOperationException, RuntimeException {
        super(EFFECT_TYPE_VIRTUALIZER, EFFECT_TYPE_NULL, priority, audioSession);
        super(EFFECT_TYPE_VIRTUALIZER, EFFECT_TYPE_NULL, priority, audioSession);


        short[] value = new short[1];
        int[] value = new int[1];
        checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
        checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
        mStrengthSupported = (value[0] != 0);
        mStrengthSupported = (value[0] != 0);
    }
    }
+15 −2
Original line number Original line Diff line number Diff line
@@ -1626,9 +1626,15 @@ int BassBoost_getParameter(EffectContext *pContext,


    switch (param){
    switch (param){
        case BASSBOOST_PARAM_STRENGTH_SUPPORTED:
        case BASSBOOST_PARAM_STRENGTH_SUPPORTED:
            if (*pValueSize != sizeof(uint32_t)){
                LOGV("\tLVM_ERROR : BassBoost_getParameter() invalid pValueSize %d", *pValueSize);
                return -EINVAL;
            }
            *pValueSize = sizeof(uint32_t);
            break;
        case BASSBOOST_PARAM_STRENGTH:
        case BASSBOOST_PARAM_STRENGTH:
            if (*pValueSize != sizeof(int16_t)){
            if (*pValueSize != sizeof(int16_t)){
                LOGV("\tLVM_ERROR : BassBoost_getParameter() invalid pValueSize2 %d", *pValueSize);
                LOGV("\tLVM_ERROR : BassBoost_getParameter() invalid pValueSize %d", *pValueSize);
                return -EINVAL;
                return -EINVAL;
            }
            }
            *pValueSize = sizeof(int16_t);
            *pValueSize = sizeof(int16_t);
@@ -1736,9 +1742,16 @@ int Virtualizer_getParameter(EffectContext *pContext,


    switch (param){
    switch (param){
        case VIRTUALIZER_PARAM_STRENGTH_SUPPORTED:
        case VIRTUALIZER_PARAM_STRENGTH_SUPPORTED:
            if (*pValueSize != sizeof(uint32_t)){
                LOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid pValueSize %d",*pValueSize);
                return -EINVAL;
            }
            *pValueSize = sizeof(uint32_t);
            break;

        case VIRTUALIZER_PARAM_STRENGTH:
        case VIRTUALIZER_PARAM_STRENGTH:
            if (*pValueSize != sizeof(int16_t)){
            if (*pValueSize != sizeof(int16_t)){
                LOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid pValueSize2 %d",*pValueSize);
                LOGV("\tLVM_ERROR : Virtualizer_getParameter() invalid pValueSize %d",*pValueSize);
                return -EINVAL;
                return -EINVAL;
            }
            }
            *pValueSize = sizeof(int16_t);
            *pValueSize = sizeof(int16_t);