|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.engine.Out jass.generators.Sine
public class Sine
Output sine wave. (Highly inefficient implementation.)
Field Summary | |
---|---|
protected float |
freq
Freq. |
protected float |
phase
Current phase |
float |
srate
Sampling rate in Hertz of Out. |
static float |
TWOPI
|
protected float |
volume
Amplitude or volume of sine |
Fields inherited from class jass.engine.Out |
---|
buf, bufferSize, bufOld, lock |
Constructor Summary | |
---|---|
Sine(float srate,
int bufferSize)
|
Method Summary | |
---|---|
protected void |
computeBuffer()
Compute the next buffer and store in member float[] buf. |
void |
setFrequency(float f)
Set frequency |
void |
setVolume(float val)
Set amplitude |
Methods inherited from class jass.engine.Out |
---|
clearBuffer, copyToOld, getBuffer, getBuffer, getBufferSize, getTime, peekAtBuffer, resetTime, setBufferSize, setTime, setTimeAndNotify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float srate
protected float volume
protected float phase
protected float freq
public static final float TWOPI
Constructor Detail |
---|
public Sine(float srate, int bufferSize)
Method Detail |
---|
public void setVolume(float val)
val
- Volume.public void setFrequency(float f)
f
- frequency.protected void computeBuffer()
Out
computeBuffer
in class Out
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |