我知道android.media.audiofx.Equalizer
可以增益/降低频带。我需要做的是完全过滤掉一个频率范围。这是用于增益/降低频率的代码:
Equalizer mEqualizer = new Equalizer(0,audioSessionId);
mEqualizer.setEnabled(true);
short bands = mEqualizer.getNumberOfBands();
final short minEQLevel = mEqualizer.getBandLevelRange()[0];
final short maxEQLevel = mEqualizer.getBandLevelRange()[1];
mEqualizer.setBandLevel((short) 0, (short) (maxEQLevel));
mEqualizer.setBandLevel((short) 1, (short) (maxEQLevel));
//the following code wont work because setting levels.lower than minimum level is not acceptable
mEqualizer.setBandLevel((short) 2, (short) (-1000000));
如果我的要求是不可能的,那么你会建议什么?从头开始编写 FFT 类?