|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.engine.Out jass.engine.InOut jass.generators.Mixer
public class Mixer
Mixer UG. Also allows conversion to stereo.
Field Summary | |
---|---|
protected float[] |
gains
|
protected int |
nChannels
|
protected float[] |
pans
|
protected float[] |
tmp_buf
|
Fields inherited from class jass.engine.InOut |
---|
sourceContainer, sourcePassivity, srcBuffers |
Fields inherited from class jass.engine.Out |
---|
buf, bufferSize, bufOld, lock |
Constructor Summary | |
---|---|
Mixer(int bufferSize)
Create. |
|
Mixer(int bufferSize,
int n)
Create mono mixer |
|
Mixer(int bufferSize,
int n,
int nChannels)
Create stereo mixer |
Method Summary | |
---|---|
void |
clear()
Clear gains ato zero and pans to middle |
protected void |
computeBuffer()
Compute the next buffer and store in member float[] buf. |
float[] |
getGains()
Get input gain control vector. |
int |
getNChannels()
Get nchannels |
float[] |
getPans()
Get input pan control vector. |
void |
setGain(int k,
float g)
Set input gain control vector. |
void |
setNChannels(int n)
Set nchannels |
void |
setPan(int k,
float pan)
Set input pan |
Methods inherited from class jass.engine.InOut |
---|
addSource, addSource, getBuffer, getSources, removeSource, resetTime |
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 |
---|
protected float[] gains
protected float[] pans
protected int nChannels
protected float[] tmp_buf
Constructor Detail |
---|
public Mixer(int bufferSize, int n)
bufferSize
- Buffer size used for real-time rendering.n
- no inputspublic Mixer(int bufferSize, int n, int nChannels)
bufferSize
- Buffer size used for real-time rendering. For stereo must be 2X input buffersizen
- no inputspublic Mixer(int bufferSize)
bufferSize
- Buffer size used for real-time rendering.Method Detail |
---|
public void setGain(int k, float g)
k
- index of gaingains
- input gainpublic void setPan(int k, float pan)
k
- index of panpan
- panpublic void setNChannels(int n)
n
- nchannelspublic int getNChannels()
public float[] getGains()
gains
- input gainspublic float[] getPans()
gains
- input gainspublic void clear()
protected void computeBuffer()
computeBuffer
in class Out
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |