예제 #1
0
 public void initBassBoost() {
   try {
     bassBoost = getBassBoost();
     if (null != bassBoost) {
       bassBoost.setEnabled(true);
       BassBoost.Settings bassBoostSettingTemp = bassBoost.getProperties();
       BassBoost.Settings bassBoostSetting =
           new BassBoost.Settings(bassBoostSettingTemp.toString());
       bassBoostSetting.strength = 0;
       bassBoost.setProperties(bassBoostSetting);
       Log.e("bbSetTemp", bassBoost.getProperties().toString());
     }
   } catch (Exception localException) {
     localException.printStackTrace();
   }
 }
예제 #2
0
  @Override
  public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {

    seekBar.setProgress(progress);

    // ===========================================temporary
    if (seekBar == sk1) {

      BassBoost.Settings settings = bassBoost.getProperties();
      settings.strength = ((short) (progress * 10));
      bassBoost.setProperties(settings);
      if (progress != 0) {
        presetsSpinner.setSelection(0);
      }
      sk1pgs = progress;

    } else if (seekBar == sk2) {

      virtualizer.setStrength((short) (progress * 10));
      if (progress != 0) {
        presetsSpinner.setSelection(0);
      }
      sk2pgs = progress;
    }

    // ===============================================/temporary

    if (progress == 15) progress = 0;
    else progress = progress - 15;

    if (seekBar == sb1) {

      sbP1.setText(Integer.toString(progress));
      presetsSpinner.setSelection(0);
      Utils.changeAtBand(equalizer, band1, progress);

    } else if (seekBar == sb2) {

      sbP2.setText(Integer.toString(progress));
      presetsSpinner.setSelection(0);
      Utils.changeAtBand(equalizer, band2, progress);

    } else if (seekBar == sb3) {

      sbP3.setText(Integer.toString(progress));
      presetsSpinner.setSelection(0);
      Utils.changeAtBand(equalizer, band3, progress);

    } else if (seekBar == sb4) {

      sbP4.setText(Integer.toString(progress));
      presetsSpinner.setSelection(0);
      Utils.changeAtBand(equalizer, band4, progress);

    } else if (seekBar == sb5) {

      sbP5.setText(Integer.toString(progress));
      presetsSpinner.setSelection(0);
      Utils.changeAtBand(equalizer, band5, progress);
    }
    Utils.setEqPrefs(MyEqualizer.this, true);
  }