From 0546223bbaae2cc62a9d254daa6cb2a02a78eaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mih=C3=A1ly=20Kuprivecz?= Date: Thu, 11 May 2017 21:44:07 +0200 Subject: [PATCH] quick fix --- event-queue/src/main/java/com/iluwatar/event/queue/Audio.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/event-queue/src/main/java/com/iluwatar/event/queue/Audio.java b/event-queue/src/main/java/com/iluwatar/event/queue/Audio.java index 7c2f04d0926f..7554464dde72 100644 --- a/event-queue/src/main/java/com/iluwatar/event/queue/Audio.java +++ b/event-queue/src/main/java/com/iluwatar/event/queue/Audio.java @@ -132,9 +132,10 @@ public static void update() { } Clip clip = null; try { + AudioInputStream audioStream = getPendingAudio()[headIndex].stream; headIndex++; clip = AudioSystem.getClip(); - clip.open(getPendingAudio()[headIndex].stream); + clip.open(audioStream); clip.start(); } catch (LineUnavailableException e) { System.err.println("Error occoured while loading the audio: The line is unavailable");