I am trying to make an android equalizer but I am not able to use the virtualizer properly .Not Visualizer this is some piece of my code the app is not getting crashed but it is just not working
vr = new Virtualizer(0, mediaPlayer.getAudioSessionId());
virtal.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
if (seekBar == virtal) {
vr.setEnabled(level > 0 ? true : false);
vr.setStrength((short) i); // Already in the right range 0-1000
} else if (eq != null) {
int new_level = min_level + (max_level - min_level) * level / 100;
for (int j = 0; j < num_sliders; j++) {
if (sliders[j] == seekBar) {
eq.setBandLevel((short) j, (short) new_level);
break;
}
}
}
}
i am able to use the equalizer and baseboost class but don't know why this one is not showing any effect in the audio.Any help or guidance will be helpful.I followed some of the projects like James music player but don't know what is the issue.