Skip to content

Commit

Permalink
Revert breaking changes for now (will be re-added in a later version)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias <webmaster@pottgames.de>
  • Loading branch information
Hangman committed Jul 28, 2024
1 parent 6f4292b commit dc3451f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val junitJupiterPlatformLauncherVersion: String by project
val flacLibraryJavaVersion: String by project

buildscript {
project.version = "5.0.0"
project.version = "4.4.0"
project.group = "de.pottgames"
}

Expand Down
14 changes: 0 additions & 14 deletions core/src/main/java/de/pottgames/tuningfork/jukebox/JukeBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ protected float fadeOut(SongSource source, SongSettings settings, float playback
* @param volume
*/
public void setVolume(float volume) {
final float oldVolume = this.volume;
this.volume = MathUtils.clamp(volume, 0f, 1f);
this.pushVolumeEvent(oldVolume, this.volume);
}


Expand Down Expand Up @@ -409,15 +407,6 @@ public void removeObserver(JukeBoxObserver observer) {
}


protected void pushVolumeEvent(float oldVolume, float newVolume) {
final JukeBoxEvent event = this.eventPool.obtain();
event.setType(JukeBoxEventType.MASTER_VOLUME_CHANGE);
event.setOldVolume(oldVolume);
event.setNewVolume(newVolume);
this.eventHistory.add(event);
}


protected void pushEvent(JukeBoxEventType type) {
final JukeBoxEvent event = this.eventPool.obtain();
event.setType(type);
Expand Down Expand Up @@ -470,9 +459,6 @@ protected void handleEvents() {
break;
case NONE:
break;
case MASTER_VOLUME_CHANGE:
this.notifyVolumeChange(event.getOldVolume(), event.getNewVolume());
break;
}
this.eventPool.free(event);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void setNewVolume(float newVolume) {


public enum JukeBoxEventType {
SONG_START, SONG_END, PLAYLIST_START, PLAYLIST_END, JUKEBOX_START, JUKEBOX_END, JUKEBOX_PAUSE, MASTER_VOLUME_CHANGE, NONE
SONG_START, SONG_END, PLAYLIST_START, PLAYLIST_END, JUKEBOX_START, JUKEBOX_END, JUKEBOX_PAUSE, NONE
}

}

0 comments on commit dc3451f

Please sign in to comment.