am 1aaba885: Merge "Audio Effects: fixed "strength supported" parameter size." into gingerbread
Merge commit '1aaba885def9a3b59edbfe2a0f8c3899948533ff' into gingerbread-plus-aosp * commit '1aaba885def9a3b59edbfe2a0f8c3899948533ff': Audio Effects: fixed "strength supported" parameter size.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user