diff --git a/src/itdelatrisu/opsu/audio/MusicController.java b/src/itdelatrisu/opsu/audio/MusicController.java index a3d370a3..722a2922 100644 --- a/src/itdelatrisu/opsu/audio/MusicController.java +++ b/src/itdelatrisu/opsu/audio/MusicController.java @@ -137,7 +137,20 @@ else if (beatmap.previewTime != lastBeatmap.previewTime) */ private static void loadTrack(File file, int position, boolean loop) { try { + // create the music player + // NOTE: most errors from this call are suppressed, so check + // for SoundStore errors manually afterwards player = new Music(file.getPath(), true); + if (!SoundStore.get().soundWorks()) { + player = null; + trackEnded = false; + ErrorHandler.error( + "Sound isn't working right now. Sorry!\n" + + "Restarting the game will probably fix this.", + null, false + ); + return; + } player.addListener(new MusicListener() { @Override public void musicEnded(Music music) {