diff --git a/client/src/main/java/nl/andrewlalis/aos_client/sound/SoundManager.java b/client/src/main/java/nl/andrewlalis/aos_client/sound/SoundManager.java index 28e6358..d6aa635 100644 --- a/client/src/main/java/nl/andrewlalis/aos_client/sound/SoundManager.java +++ b/client/src/main/java/nl/andrewlalis/aos_client/sound/SoundManager.java @@ -36,7 +36,19 @@ public class SoundManager { private static final float CLIP_BUFFER_SIZE = 1.0f / 10.0f; private final ExecutorService soundPlayerThreadPool = Executors.newCachedThreadPool(); + + /** + * Cached set of audio clips that are used for playing sounds, instead of + * loading each clip's bytes from the disk each time. + */ private final Map audioClips = new HashMap<>(); + + /** + * Map that keeps track of the last footstep sound made by any player, which + * is used in determining when the next footstep sound should be played. We + * use a {@link TimedCompletableFuture} so that we know how much time has + * elapsed since the footstep started. + */ private final Map> footstepAudioFutures = new HashMap<>(); /** diff --git a/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps1.wav b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps1.wav new file mode 100644 index 0000000..2cb729f Binary files /dev/null and b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps1.wav differ diff --git a/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps2.wav b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps2.wav new file mode 100644 index 0000000..542d079 Binary files /dev/null and b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps2.wav differ diff --git a/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps3.wav b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps3.wav new file mode 100644 index 0000000..3a7e97f Binary files /dev/null and b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps3.wav differ diff --git a/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps4.wav b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps4.wav new file mode 100644 index 0000000..3b6d4d3 Binary files /dev/null and b/client/src/main/resources/nl/andrewlalis/aos_client/sound/footsteps4.wav differ