Package edu.tufts.hrilab.util
Class Audio
java.lang.Object
edu.tufts.hrilab.util.Audio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
Audio
public Audio()
-
-
Method Details
-
bytesToFloats
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
-