public void muteVolume() { if (mVolumeBeforeMute != -1) { mSeekBar.setProgress(mVolumeBeforeMute); startSample(); volumizerStrategy.setVolume(mVolumeBeforeMute); mVolumeBeforeMute = -1; } else { mVolumeBeforeMute = mSeekBar.getProgress(); mSeekBar.setProgress(0); volumizerStrategy.stopSample(); volumizerStrategy.setVolume(0); } }
public void changeVolumeBy(int amount) { mSeekBar.incrementProgressBy(amount); startSample(); volumizerStrategy.setVolume(mSeekBar.getProgress()); mVolumeBeforeMute = -1; }
@Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) { if (!fromTouch) return; volumizerStrategy.setVolume(progress); }