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 | 7fa8a0ec14781a50695cf8c9dd2a85a5e8a3c3f0 (patch) | |
tree | e25fd604bb57f98f2de0628c91478eaeafe08cb3 /media | |
parent | c059860c73678a202bfa33062723e8f82fb779d9 (diff) | |
download | frameworks_av-7fa8a0ec14781a50695cf8c9dd2a85a5e8a3c3f0.zip frameworks_av-7fa8a0ec14781a50695cf8c9dd2a85a5e8a3c3f0.tar.gz frameworks_av-7fa8a0ec14781a50695cf8c9dd2a85a5e8a3c3f0.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')
-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); |