mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 16:14:58 +00:00
quick fix
This commit is contained in:
1 parent
857902ab95
commit
0546223bba
1 file changed
+2
-1
@@ -132,9 +132,10 @@ public class Audio {
|
|||||||
}
|
}
|
||||||
Clip clip = null;
|
Clip clip = null;
|
||||||
try {
|
try {
|
||||||
|
AudioInputStream audioStream = getPendingAudio()[headIndex].stream;
|
||||||
headIndex++;
|
headIndex++;
|
||||||
clip = AudioSystem.getClip();
|
clip = AudioSystem.getClip();
|
||||||
clip.open(getPendingAudio()[headIndex].stream);
|
clip.open(audioStream);
|
||||||
clip.start();
|
clip.start();
|
||||||
} catch (LineUnavailableException e) {
|
} catch (LineUnavailableException e) {
|
||||||
System.err.println("Error occoured while loading the audio: The line is unavailable");
|
System.err.println("Error occoured while loading the audio: The line is unavailable");
|
||||||
|
|||||||
Reference in new issue
Block a user