Package javaforce.media
Class AudioGenerate
java.lang.Object
javaforce.media.AudioGenerate
AudioGenerate
Generated by ChatGPT
- Author:
- pquiring
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SINE
public static final int SINE- See Also:
-
SQUARE
public static final int SQUARE- See Also:
-
SAW
public static final int SAW- See Also:
-
-
Constructor Details
-
AudioGenerate
public AudioGenerate()
-
-
Method Details
-
generate
public void generate(short[] out, int type, int sampleRate, int frequency, float amplitude) Generate sound wave.- Parameters:
out- = outputtype- = wave typesampleRate- = sample rate (44100, etc.)frequency- = frequency of waveamplitude- = amplitude (0.0 to 1.0)
-
reset
public void reset()Resets the phase offset to zero.
-