Merge "Audio Effects: fixed "strength supported" parameter size." into gingerbread
This commit is contained in:
@@ -99,7 +99,7 @@ public class BassBoost extends AudioEffect {
|
||||
UnsupportedOperationException, RuntimeException {
|
||||
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));
|
||||
mStrengthSupported = (value[0] != 0);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class Virtualizer extends AudioEffect {
|
||||
UnsupportedOperationException, RuntimeException {
|
||||
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));
|
||||
mStrengthSupported = (value[0] != 0);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user