jass.generators
Class SpatialMixer
java.lang.Object
jass.engine.Out
jass.engine.InOut
jass.generators.SpatialMixer
- All Implemented Interfaces:
- Sink, Source
public class SpatialMixer
- extends InOut
Spatial Mixer UG.
- Author:
- Reynald Hoskinson (reynald@cs.ubc.ca)
Constructor Summary |
SpatialMixer(int bufferSize)
Create. |
SpatialMixer(int bufferSize,
int n,
java.lang.String hrtf_data)
Create stereo Spatialized mixer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tmp_bufL
protected float[] tmp_bufL
tmp_bufR
protected float[] tmp_bufR
tmp_out
protected float[] tmp_out
hrtf
protected HRTF hrtf
positions
protected PositionData[] positions
SpatialMixer
public SpatialMixer(int bufferSize,
int n,
java.lang.String hrtf_data)
- Create stereo Spatialized mixer
- Parameters:
bufferSize
- Buffer size used for real-time rendering.
For stereo must be 2X input buffersizen
- no inputshrtf_data
- hrtf file.
SpatialMixer
public SpatialMixer(int bufferSize)
- Create. For superclasses
- Parameters:
bufferSize
- Buffer size used for real-time rendering.
startHRTF
public void startHRTF()
- set filename to obtain hrir info for 1 subject
- Parameters:
filename
- filename of subject's hrir data
stopHRTF
public void stopHRTF()
changeHRTF
public void changeHRTF(java.io.File filename)
setPosition
public void setPosition(int inputNo,
PositionData p)
- set position of source
- Parameters:
inputNo
- buffer number to set position ofp
- Position data gives the 3D coordinate of the sound source
computeBuffer
protected void computeBuffer()
- Compute the next buffer and store in member float[] buf.
Note if stereo then output buf[] is twice as big as input buffers
--> this means that each source is a mono stream.
will sourceContainer.size() always == n in Mixer constructor?
- Specified by:
computeBuffer
in class Out