Class Audio

java.lang.Object
edu.tufts.hrilab.util.Audio

public class Audio extends Object
  • Constructor Details

    • Audio

      public Audio()
  • Method Details

    • bytesToFloats

      public static float[] bytesToFloats(ByteBuffer buffer)
      Converts the given ByteBuffer containing audio data represented as 16-bit shorts to an array of floating-point values normalized between -1.0 and 1.0.
      Parameters:
      buffer - The ByteBuffer containing audio data represented as 16-bit shorts
      Returns:
      An array of floating-point values representing the normalized audio samples