diff options
author | Eric Laurent <elaurent@google.com> | 2010-08-18 14:31:25 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-08-18 14:31:25 -0700 |
commit | ba8da2e61b1d9ebb7a4758f1f7849ff8440bd20c (patch) | |
tree | 49592167b3636f6b3079381279d3e6286193b970 /media/libeffects/lvm | |
parent | f6354aca3a4d0571a66747d9cdc247a1d411d660 (diff) | |
download | frameworks_base-ba8da2e61b1d9ebb7a4758f1f7849ff8440bd20c.zip frameworks_base-ba8da2e61b1d9ebb7a4758f1f7849ff8440bd20c.tar.gz frameworks_base-ba8da2e61b1d9ebb7a4758f1f7849ff8440bd20c.tar.bz2 |
Audio Effects: fixed "strength supported" parameter size.
The "strength supported" parameter for bass boost and virtualizer effect was incorrectly using a
short value whereas it should be an int. This is to comply to the definition of boolean type in OpenSL ES
that is uint32.
Change-Id: I74ccb61dcc70fc9d390524a1ca5bbbd8b13ab1af
Diffstat (limited to 'media/libeffects/lvm')
-rw-r--r-- | media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp index a70bdff..bcd646a 100644 --- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp +++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp @@ -1626,9 +1626,15 @@ int BassBoost_getParameter(EffectContext *pContext, switch (param){ 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: 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; } *pValueSize = sizeof(int16_t); @@ -1736,9 +1742,16 @@ int Virtualizer_getParameter(EffectContext *pContext, switch (param){ 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: 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; } *pValueSize = sizeof(int16_t); |