From 0072477c3b18edefae34e0b634436aeecb625b10 Mon Sep 17 00:00:00 2001 From: Aidan Ross Date: Tue, 30 May 2023 08:13:47 -0400 Subject: Early syncing tests with placeholder hit sounds and miss sounds --- src/sound/ShortAudioPlayer.java | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/sound/ShortAudioPlayer.java') diff --git a/src/sound/ShortAudioPlayer.java b/src/sound/ShortAudioPlayer.java index ed3417b..e81c4ee 100644 --- a/src/sound/ShortAudioPlayer.java +++ b/src/sound/ShortAudioPlayer.java @@ -50,19 +50,19 @@ package sound; audioClip.start(); - while (!playCompleted) - { - // wait for the playback to complete - try - { - Thread.sleep(1000); - } - catch (InterruptedException ex) - { - ex.printStackTrace(); - } - } - audioClip.close(); //stops the audio clip + // while (!playCompleted) + // { + // // wait for the playback to complete + // try + // { + // Thread.sleep(1000); + // } + // catch (InterruptedException ex) + // { + // ex.printStackTrace(); + // } + // } + // audioClip.close(); //stops the audio clip } catch (UnsupportedAudioFileException ex) { @@ -90,14 +90,14 @@ package sound; { LineEvent.Type type = event.getType(); - if (type == LineEvent.Type.START) - { - System.out.println("Playback started."); - } - else if (type == LineEvent.Type.STOP) - { - playCompleted = true; - System.out.println("Playback completed."); - } + // if (type == LineEvent.Type.START) + // { + // System.out.println("Playback started."); + // } + // else if (type == LineEvent.Type.STOP) + // { + // playCompleted = true; + // System.out.println("Playback completed."); + // } } } -- cgit v1.2.3