|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.audioengines.Sample
com.sun.j3d.audioengines.javasound.JSSample
com.sun.j3d.audioengines.javasound.JSPositionalSample
class JSPositionalSample
The PostionalSample Class defines the data and methods associated with a PointSound sample played thru the AudioDevice.
Field Summary | |
---|---|
(package private) boolean |
averageDistances
|
(package private) static int |
AWAY
|
(package private) Point3f[] |
centerEars
|
(package private) int |
currentIndex
|
(package private) long |
deltaTime
|
protected static boolean |
dopplerFlag
|
(package private) boolean |
filterFlag
|
(package private) float |
filterFreq
|
(package private) int |
firstIndex
|
(package private) double |
headPositionChange
|
(package private) double |
lastActualDopplerRateRatio
|
(package private) int |
lastIndex
|
(package private) double |
lastRequestedDopplerRateRatio
|
(package private) int |
leftDelay
|
(package private) float |
leftGain
|
(package private) static int |
MAX_DISTANCES
|
(package private) static double |
maxRatio
|
(package private) static int |
NO_CHANGE
|
(package private) int |
numDistances
|
(package private) Point3f[] |
positions
|
(package private) int |
reverbIndex
A third sample for control of reverb of the stream/clip is openned and maintained for all directional/positional sounds. |
(package private) int |
rightDelay
|
(package private) float |
rightGain
|
(package private) int |
secondIndex
For positional and directional sounds, TWO Hae streams or clips are allocated, one each for the left and right channels, played at a different (delayed) time and with a different gain value. |
(package private) double |
sourcePositionChange
|
(package private) Vector3f |
sourceToCenterEar
Save vectors from source source position to transformed ear parameters |
(package private) Vector3f |
sourceToLeftEar
|
(package private) Vector3f |
sourceToRightEar
|
(package private) long[] |
times
|
(package private) static int |
TOWARDS
|
(package private) Vector3f |
xformHeadZAxis
|
(package private) Point3f |
xformLeftEar
Save ear positions transformed into VirtualWorld coords from Head coords These default positions are used when the real values cannot queried |
(package private) Point3f |
xformRightEar
|
Fields inherited from class com.sun.j3d.audioengines.javasound.JSSample |
---|
attackLength, BUFFERED_AUDIO_DATA, BUFFERED_MIDI_DATA, channel, currentRateRatio, dataOffset, dataType, loopLength, loopStartOffset, NULL_SAMPLE, positionDeactivated, rampRateFlag, rateRatio, releaseLength, sampleLength, STREAMING_AUDIO_DATA, STREAMING_MIDI_DATA, targetRateRatio, timeDeactivated, UNSUPPORTED_DATA_TYPE |
Fields inherited from class com.sun.j3d.audioengines.Sample |
---|
angularDistance, angularFilterCutoff, angularFilterType, angularGain, attenuationDistance, attenuationGain, backAttenuationDistance, backAttenuationGain, debugFlag, direction, dirtyFlags, duration, DURATION_UNKNOWN, gain, internalErrors, loopCount, LOW_PASS, mute, NO_FILTERING, numberOfChannels, obstructionFilterCutoff, obstructionFilterType, obstructionGain, occlusionFilterCutoff, occlusionFilterType, occlusionGain, position, rateScaleFactor, soundData, soundType, vworldXfrm, vwXfrmFlag |
Constructor Summary | |
---|---|
JSPositionalSample()
|
Method Summary | |
---|---|
(package private) float |
calculateAngularGain()
|
(package private) float |
calculateDistanceAttenuation(float distance)
CalculateDistanceAttenuation Simply calls generic (for PointSound) 'findFactor()' with a single set of attenuation distance and gain scale factor arrays. |
(package private) float |
calculateDoppler(AuralParameters attribs)
Set Doppler effect Rate Calculate the rate of change in for the head and sound between the two time stamps (last two times position or VirtualWorld transform was updated). |
(package private) void |
calculateFilter(float distance,
AuralParameters attribs)
|
(package private) boolean |
calculateNewEar(int dirtyFlags,
View view,
Point3f xformCenterEar)
|
void |
clear()
Clears the fields associated with sample data for this sound, and frees any device specific data associated with this sample. |
(package private) float |
findFactor(double distance,
double[] distanceArray,
float[] factorArray)
|
(package private) boolean |
getFilterFlag()
|
(package private) float |
getFilterFreq()
|
(package private) void |
incrementIndices()
|
(package private) void |
panSample(AuralParameters attribs)
|
void |
render(int dirtyFlags,
View view,
AuralParameters attribs)
Render this sample Calculate the audiodevice parameters necessary to spatially play this sound. |
(package private) void |
reset()
Reset time and count based fields associated with sample data for this sound |
(package private) void |
setXformedPosition()
|
(package private) void |
updateEar(int dirtyFlags,
View view)
|
Methods inherited from class com.sun.j3d.audioengines.javasound.JSSample |
---|
getCurrentRateRatio, getDataType, getRampRateFlag, getTargetRateRatio, load, setCurrentRateRatio, setDataType, setRampRateFlag, setTargetRateRatio |
Methods inherited from class com.sun.j3d.audioengines.Sample |
---|
debugPrint, debugPrintln, getDirtyFlags, getDuration, getGain, getLoopCount, getMuteFlag, getNumberOfChannelsUsed, getObstructionGain, getOcclusionGain, getRateScaleFactor, getSoundData, getSoundType, getStartTime, getVWrldXfrmFlag, setAngularAttenuation, setDirection, setDirtyFlags, setDistanceGain, setGain, setLoopCount, setMuteFlag, setObstructionFilter, setObstructionGain, setOcclusionFilter, setOcclusionGain, setPosition, setRateScaleFactor, setSoundData, setSoundType, setVWrldXfrmFlag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
float leftGain
float rightGain
int leftDelay
int rightDelay
protected static final boolean dopplerFlag
int secondIndex
int reverbIndex
Point3f xformLeftEar
Point3f xformRightEar
Vector3f xformHeadZAxis
Vector3f sourceToCenterEar
Vector3f sourceToRightEar
Vector3f sourceToLeftEar
boolean averageDistances
long deltaTime
double sourcePositionChange
double headPositionChange
static int MAX_DISTANCES
int numDistances
long[] times
Point3f[] positions
Point3f[] centerEars
int firstIndex
int lastIndex
int currentIndex
double lastRequestedDopplerRateRatio
double lastActualDopplerRateRatio
static double maxRatio
static int TOWARDS
static int NO_CHANGE
static int AWAY
boolean filterFlag
float filterFreq
Constructor Detail |
---|
public JSPositionalSample()
Method Detail |
---|
boolean getFilterFlag()
getFilterFlag
in class JSSample
float getFilterFreq()
getFilterFreq
in class JSSample
public void clear()
clear
in class JSSample
void reset()
reset
in class JSSample
void incrementIndices()
void setXformedPosition()
float calculateDoppler(AuralParameters attribs)
void updateEar(int dirtyFlags, View view)
boolean calculateNewEar(int dirtyFlags, View view, Point3f xformCenterEar)
public void render(int dirtyFlags, View view, AuralParameters attribs)
render
in class JSSample
float calculateAngularGain()
void calculateFilter(float distance, AuralParameters attribs)
float findFactor(double distance, double[] distanceArray, float[] factorArray)
float calculateDistanceAttenuation(float distance)
void panSample(AuralParameters attribs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |