diff --git a/src/main/java/de/presti/ree6/utils/data/AudioUtil.java b/src/main/java/de/presti/ree6/utils/data/AudioUtil.java index c7a16c03b..c6b897916 100644 --- a/src/main/java/de/presti/ree6/utils/data/AudioUtil.java +++ b/src/main/java/de/presti/ree6/utils/data/AudioUtil.java @@ -31,6 +31,12 @@ private AudioUtil() { */ private static final int CHANNELS = 2; + /** + * Convert a PCM ByteBuffer into a WAV encoded byte array. + * @param byteBuffer The PCM ByteBuffer. + * @return The WAV encoded byte array. + * @throws IOException If an error occurs. + */ public static byte[] convert(ByteBuffer byteBuffer) throws IOException { AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(AudioFormat.Encoding.PCM_SIGNED,