Skip to content

Commit

Permalink
Removed useless variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni0451 committed May 8, 2024
1 parent 656e50a commit dc3ea6f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public static void close() {
private final JLabel soundCount = new JLabel("Sounds: 0/" + DECIMAL_FORMAT.format(this.maxSoundsSpinner.getValue()));
private final JLabel progressLabel = new JLabel("Current Position: 00:00:00");
private SoundSystem soundSystem;
private float volume = 1F;

private SongPlayerFrame(final ListFrame.LoadedSong song, final SongView<?> view) {
this.song = song;
Expand Down Expand Up @@ -140,8 +139,7 @@ private void initComponents() {
this.volumeSlider.setMajorTickSpacing(25);
this.volumeSlider.setMinorTickSpacing(5);
this.volumeSlider.addChangeListener(e -> {
this.volume = this.volumeSlider.getValue() / 100F;
if (this.soundSystem != null) this.soundSystem.setMasterVolume(this.volume);
if (this.soundSystem != null) this.soundSystem.setMasterVolume(this.volumeSlider.getValue() / 100F);
lastVolume = this.volumeSlider.getValue();
});
});
Expand Down Expand Up @@ -216,7 +214,7 @@ private void initComponents() {
if (this.soundSystem != null) this.soundSystem.stopSounds();
} else {
if (this.initSoundSystem()) {
this.soundSystem.setMasterVolume(this.volume);
this.soundSystem.setMasterVolume(this.volumeSlider.getValue() / 100F);
this.songPlayer.play();
}
}
Expand Down

0 comments on commit dc3ea6f

Please sign in to comment.