@Override public void run() { // the effects have just been reset! enablingEffect = false; chkEqualizer.setChecked(Equalizer.isEnabled(audioSink)); chkBass.setChecked(BassBoost.isEnabled(audioSink)); chkVirtualizer.setChecked(Virtualizer.isEnabled(audioSink)); }
private void updateEffects() { chkEqualizer.setChecked(Equalizer.isEnabled(audioSink)); if (bars != null && frequencies != null) { for (int i = bars.length - 1; i >= 0; i--) { final BgSeekBar bar = bars[i]; if (bar != null) { final int level = Equalizer.getBandLevel(i, audioSink); bars[i].setText(format(frequencies[i], level)); bars[i].setValue( ((level <= LevelThreshold) && (level >= -LevelThreshold)) ? (-min / 10) : ((level - min) / 10)); } } } chkBass.setChecked(BassBoost.isEnabled(audioSink)); barBass.setValue(BassBoost.getStrength(audioSink)); barBass.setText(format(BassBoost.getStrength(audioSink))); chkVirtualizer.setChecked(Virtualizer.isEnabled(audioSink)); barVirtualizer.setValue(Virtualizer.getStrength(audioSink)); barVirtualizer.setText(format(Virtualizer.getStrength(audioSink))); }