Skip to content

Commit fc625d6

Browse files
committed
Fixed sound system change detection
1 parent 7815dc3 commit fc625d6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/java/net/raphimc/noteblocktool/frames/SongPlayerFrame.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,19 @@ private void initComponents() {
250250
}
251251

252252
private boolean initSoundSystem() {
253-
int currentIndex = -1;
253+
final int currentIndex;
254254
if (this.soundSystem instanceof OpenALSoundSystem) {
255255
currentIndex = 0;
256-
} else if (this.soundSystem instanceof JavaxSoundSystem) {
256+
} else if (this.soundSystem instanceof BassSoundSystem) {
257257
currentIndex = 1;
258+
} else if (this.soundSystem instanceof MultithreadedJavaxSoundSystem) {
259+
currentIndex = 3;
260+
} else if (this.soundSystem instanceof JavaxSoundSystem) {
261+
currentIndex = 2;
262+
} else if (this.soundSystem == null) {
263+
currentIndex = -1;
264+
} else {
265+
throw new UnsupportedOperationException(UNAVAILABLE_MESSAGE);
258266
}
259267

260268
try {

0 commit comments

Comments
 (0)