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 float
MIDDLE_C
-
Constructor Summary
Constructors Constructor Description SimpleSineSynth()
SimpleSineSynth(Device device)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getAmplitude()
Context
getContext()
Return this instance's OpenALContext
.Device
getDevice()
Return this instance's OpenALDevice
.float
getFreq()
int
getGenPTS()
int
getLatency()
Returns latency or frame-duration in millisecondsint
getPTS()
ALAudioSink
getSink()
Source
getSource()
Return this instance's OpenALSource
.boolean
isPlaying()
boolean
isRunning()
void
pause()
void
play()
void
setAmplitude(float a)
void
setFreq(float f)
void
stop()
String
toString()
-
-
-
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()
-
getGenPTS
public int getGenPTS()
-
getPTS
public int getPTS()
-
-