@@ -44,8 +44,8 @@ public class PlaybackParameterDialog extends DialogFragment {
4444 private static final String TAG = "PlaybackParameterDialog" ;
4545
4646 // Minimum allowable range in ExoPlayer
47- private static final double MIN_PLAYBACK_VALUE = 0.10f ;
48- private static final double MAX_PLAYBACK_VALUE = 3.00f ;
47+ private static final double MIN_PITCH_OR_SPEED = 0.10f ;
48+ private static final double MAX_PITCH_OR_SPEED = 3.00f ;
4949
5050 private static final boolean PITCH_CTRL_MODE_PERCENT = false ;
5151 private static final boolean PITCH_CTRL_MODE_SEMITONE = true ;
@@ -62,8 +62,8 @@ public class PlaybackParameterDialog extends DialogFragment {
6262 private static final boolean DEFAULT_SKIP_SILENCE = false ;
6363
6464 private static final SliderStrategy QUADRATIC_STRATEGY = new SliderStrategy .Quadratic (
65- MIN_PLAYBACK_VALUE ,
66- MAX_PLAYBACK_VALUE ,
65+ MIN_PITCH_OR_SPEED ,
66+ MAX_PITCH_OR_SPEED ,
6767 1.00f ,
6868 10_000 );
6969
@@ -177,10 +177,10 @@ public Dialog onCreateDialog(@Nullable final Bundle savedInstanceState) {
177177
178178 private void initUI () {
179179 // Tempo
180- setText (binding .tempoMinimumText , PlayerHelper ::formatSpeed , MIN_PLAYBACK_VALUE );
181- setText (binding .tempoMaximumText , PlayerHelper ::formatSpeed , MAX_PLAYBACK_VALUE );
180+ setText (binding .tempoMinimumText , PlayerHelper ::formatSpeed , MIN_PITCH_OR_SPEED );
181+ setText (binding .tempoMaximumText , PlayerHelper ::formatSpeed , MAX_PITCH_OR_SPEED );
182182
183- binding .tempoSeekbar .setMax (QUADRATIC_STRATEGY .progressOf (MAX_PLAYBACK_VALUE ));
183+ binding .tempoSeekbar .setMax (QUADRATIC_STRATEGY .progressOf (MAX_PITCH_OR_SPEED ));
184184 setAndUpdateTempo (tempo );
185185 binding .tempoSeekbar .setOnSeekBarChangeListener (
186186 getTempoOrPitchSeekbarChangeListener (
@@ -215,10 +215,10 @@ private void initUI() {
215215 changePitchControlMode (isCurrentPitchControlModeSemitone ());
216216
217217 // Pitch - Percent
218- setText (binding .pitchPercentMinimumText , PlayerHelper ::formatPitch , MIN_PLAYBACK_VALUE );
219- setText (binding .pitchPercentMaximumText , PlayerHelper ::formatPitch , MAX_PLAYBACK_VALUE );
218+ setText (binding .pitchPercentMinimumText , PlayerHelper ::formatPitch , MIN_PITCH_OR_SPEED );
219+ setText (binding .pitchPercentMaximumText , PlayerHelper ::formatPitch , MAX_PITCH_OR_SPEED );
220220
221- binding .pitchPercentSeekbar .setMax (QUADRATIC_STRATEGY .progressOf (MAX_PLAYBACK_VALUE ));
221+ binding .pitchPercentSeekbar .setMax (QUADRATIC_STRATEGY .progressOf (MAX_PITCH_OR_SPEED ));
222222 setAndUpdatePitch (pitchPercent );
223223 binding .pitchPercentSeekbar .setOnSeekBarChangeListener (
224224 getTempoOrPitchSeekbarChangeListener (
@@ -557,12 +557,12 @@ private void setAndUpdatePitch(final double newPitch) {
557557 }
558558
559559 private double calcValidTempo (final double newTempo ) {
560- return Math .max (MIN_PLAYBACK_VALUE , Math .min (MAX_PLAYBACK_VALUE , newTempo ));
560+ return Math .max (MIN_PITCH_OR_SPEED , Math .min (MAX_PITCH_OR_SPEED , newTempo ));
561561 }
562562
563563 private double calcValidPitch (final double newPitch ) {
564564 final double calcPitch =
565- Math .max (MIN_PLAYBACK_VALUE , Math .min (MAX_PLAYBACK_VALUE , newPitch ));
565+ Math .max (MIN_PITCH_OR_SPEED , Math .min (MAX_PITCH_OR_SPEED , newPitch ));
566566
567567 if (!isCurrentPitchControlModeSemitone ()) {
568568 return calcPitch ;
0 commit comments