"Fixed double sound bug"

This commit is contained in:
lieght
2025-10-03 18:34:48 +02:00
parent 796c3a2bc6
commit 56a1afe1cd
2 changed files with 5 additions and 7 deletions

View File

@@ -128,6 +128,7 @@ public class SoundManager {
mediaPlayer.play();
activeMusic.add(mediaPlayer);
logger.info("Playing background music: {}", ma.getFile().getName());
logger.info("Background music next in line: {}", backgroundMusicQueue.peek().getFile().getName());
}
private long playSound(String audioFileName, boolean loop) throws UnsupportedAudioFileException, LineUnavailableException, IOException {
@@ -150,7 +151,7 @@ public class SoundManager {
clip.start();
}
logger.info("Playing sound: {}", asset.getFile().getName());
logger.debug("Playing sound: {}", asset.getFile().getName());
// Generate id for clip
long clipId = idGenerator.nextId();