I’m trying to create a custom audio effect by extending from the class android.media.audiofx.AudioEffect but for some reason the constructor for this class is not presenting the same signature I see in the source code here.
The AudioEffect class doesn’t seem to have some of the public static final UUID constants that define each different effect, for example like the following:
public static final UUID EFFECT_TYPE_BASS_BOOST = UUID
.fromString("0634f220-ddd4-11db-a0fc-0002a5d5c51b");
I’m using the SDK for API 10 (v2.3.3) which should work since every out-of-the-box effect that exists in android extends from this class.
public class BassBoost extends AudioEffect {
...
public BassBoost(int priority, int audioSession)
throws IllegalStateException, IllegalArgumentException,
UnsupportedOperationException, RuntimeException {
super(EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_NULL, priority, audioSession);
int[] value = new int[1];
checkStatus(getParameter(PARAM_STRENGTH_SUPPORTED, value));
mStrengthSupported = (value[0] != 0);
}
...
}
Maybe I’m missing something, but I can’t figure out what it is.
Any help will be appreciated.
Thanks.
Because of the
@hideannotations those constants are not available in the public sdk api.