feat: refactor out MusicPlayerEngine

This commit is contained in:
2026-05-24 10:56:52 +02:00
parent eb53d1e0ad
commit 183efd343e
7 changed files with 488 additions and 75 deletions

View File

@@ -0,0 +1,26 @@
package at.lockstep.player.pasada;
/** Mirrors the libpasada state machine documented in DESIGN.md. */
public enum PasadaState {
LOADED(0),
INITIALIZED(1),
PLAYING(2),
PAUSED(3),
FINISHED(4),
STOPPED(5);
public final int code;
PasadaState(int code) {
this.code = code;
}
public static PasadaState fromCode(int code) {
for (PasadaState state : values()) {
if (state.code == code) {
return state;
}
}
throw new IllegalArgumentException("Unknown PasadaState code: " + code);
}
}