Package com.jogamp.openal.util
Class SimpleSineSynth
- java.lang.Object
-
- com.jogamp.openal.util.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.
-
-
Field Summary
Fields Modifier and Type Field Description static floatMIDDLE_C
-
Constructor Summary
Constructors Constructor Description SimpleSineSynth()SimpleSineSynth(Device device)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetAmplitude()ContextgetContext()Return this instance's OpenALContext.DevicegetDevice()Return this instance's OpenALDevice.floatgetFreq()intgetLatency()Returns latency or frame-duration in millisecondsintgetNextPTS()PTSgetPTS()ALAudioSinkgetSink()SourcegetSource()Return this instance's OpenALSource.booleanisPlaying()booleanisRunning()voidpause()voidplay()voidsetAmplitude(float a)voidsetFreq(float f)voidstop()StringtoString()
-
-
-
Field Detail
-
MIDDLE_C
public static final float MIDDLE_C
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleSineSynth
public SimpleSineSynth()
-
SimpleSineSynth
public SimpleSineSynth(Device device)
-
-
Method Detail
-
getSink
public ALAudioSink getSink()
-
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()
-
getNextPTS
public int getNextPTS()
-
getPTS
public PTS getPTS()
-
-