Class SimpleSineSynth


  • public final class SimpleSineSynth
    extends Object
    A continuous simple off-thread mutable sine wave synthesizer.

    Implementation utilizes an off-thread worker thread streaming the generated wave to OpenAL, allowing to change frequency and amplitude without disturbance.

    • Constructor Detail

      • SimpleSineSynth

        public SimpleSineSynth()
      • SimpleSineSynth

        public SimpleSineSynth​(Device device)
    • Method Detail

      • getDevice

        public final Device getDevice()
        Return this instance's OpenAL Device.
      • getContext

        public final Context getContext()
        Return this instance's OpenAL Context.
      • getSource

        public final Source getSource()
        Return this instance's OpenAL Source.
      • setFreq

        public void setFreq​(float f)
      • getFreq

        public float getFreq()
      • setAmplitude

        public void setAmplitude​(float a)
      • getAmplitude

        public float getAmplitude()
      • getLatency

        public int getLatency()
        Returns latency or frame-duration in milliseconds
      • play

        public void play()
      • pause

        public void pause()
      • stop

        public void stop()
      • isPlaying

        public boolean isPlaying()
      • isRunning

        public boolean isRunning()
      • getGenPTS

        public int getGenPTS()
      • getPTS

        public int getPTS()