|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.engine.Out jass.engine.ThreadMixer
public final class ThreadMixer
Mixer that runs a thread on each input. Add sources, then call init() method, then you can use it as a normal mixer. Unlike other UG's you can't add or remove sources while running.
Field Summary | |
---|---|
float[][] |
srcBuffers
|
Fields inherited from class jass.engine.Out |
---|
buf, bufferSize, bufOld |
Constructor Summary | |
---|---|
ThreadMixer(int bufferSize)
|
Method Summary | |
---|---|
java.lang.Object |
addSource(Source s)
add source to Sink. |
protected void |
computeBuffer()
Compute the next buffer and store in member float[] buf. |
float[] |
getBuffer(long t)
Get buffer with frame index t. |
float[] |
getGains()
Get input gain control vector. |
Source[] |
getSources()
Get array of sources. |
void |
init()
|
void |
removeSource(Source s)
Remove a Source |
void |
resetTime(long t)
Reset time of self and all inputs |
void |
setGain(int k,
float g)
Set input gain control vector. |
void |
signalDone()
|
Methods inherited from class jass.engine.Out |
---|
clearBuffer, copyToOld, getBuffer, getBufferSize, getTime, peekAtBuffer, 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[][] srcBuffers
Constructor Detail |
---|
public ThreadMixer(int bufferSize)
Method Detail |
---|
public void signalDone()
public void setGain(int k, float g)
k
- index of gaingains
- input gainpublic float[] getGains()
gains
- input gainspublic java.lang.Object addSource(Source s) throws SinkIsFullException
addSource
in interface Sink
s
- Source to add.
SinkIsFullException
public void removeSource(Source s)
Sink
removeSource
in interface Sink
s
- Source to removepublic Source[] getSources()
getSources
in interface Sink
public void init()
public final float[] getBuffer(long t) throws BufferNotAvailableException
getBuffer
in interface Source
getBuffer
in class Out
t
- timestamp of buffer = frame index.
BufferNotAvailableException
public void resetTime(long t)
resetTime
in class Out
t
- time to reset to. Patch must be in a state s.t. none of the current times == tprotected final void computeBuffer()
computeBuffer
in class Out
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |