Package toxi.audio
Class SynthUtil
java.lang.Object
toxi.audio.SynthUtil
This class provides static conversion tools for translating normalized
floating point wave data into 16bit PCM.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AudioBufferfloatArrayTo16bitBuffer(JOALUtil audioSys, float[] raw, int rate) static byte[]floatArrayTo16bitPCM(float[] raw) static AudioBufferfloatArrayTo16bitStereoBuffer(JOALUtil audioSys, float[] raw, int rate) static AudioBufferfloatArrayTo8bitBuffer(JOALUtil audioSys, float[] raw, int rate) static byte[]floatArrayTo8bitPCM(float[] raw) static AudioBufferfloatArrayTo8bitStereoBuffer(JOALUtil audioSys, float[] raw, int rate) static float[]joinMonoFloatArrays(float[] left, float[] right) Merges the two given mono arrays into an interleaved stereo array in left-right order.
-
Constructor Details
-
SynthUtil
public SynthUtil()
-
-
Method Details
-
floatArrayTo16bitBuffer
-
floatArrayTo16bitPCM
public static byte[] floatArrayTo16bitPCM(float[] raw) -
floatArrayTo16bitStereoBuffer
-
floatArrayTo8bitBuffer
-
floatArrayTo8bitPCM
public static byte[] floatArrayTo8bitPCM(float[] raw) -
floatArrayTo8bitStereoBuffer
-
joinMonoFloatArrays
public static float[] joinMonoFloatArrays(float[] left, float[] right) Merges the two given mono arrays into an interleaved stereo array in left-right order.- Parameters:
left-right-- Returns:
- stereo array
-