Class AudioGenerate

java.lang.Object
javaforce.media.AudioGenerate

public class AudioGenerate extends Object
AudioGenerate Generated by ChatGPT
Author:
pquiring
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    generate(short[] out, int type, int sampleRate, int frequency, float amplitude)
    Generate sound wave.
    void
    Resets the phase offset to zero.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 - = output
      type - = wave type
      sampleRate - = sample rate (44100, etc.)
      frequency - = frequency of wave
      amplitude - = amplitude (0.0 to 1.0)
    • reset

      public void reset()
      Resets the phase offset to zero.