| java.lang.Object java.lang.Thread com.sun.j3d.audioengines.AudioEngineThread com.sun.j3d.audioengines.javasound.JSThread
JSThread | class JSThread extends com.sun.j3d.audioengines.AudioEngineThread (Code) | | The Thread Class extended for JavaSound Mixer specific audio device
calls that dynamically, in 'real-time" change engine parameters
such as volume/gain and sample-rate/frequency(pitch).
|
Method Summary | |
boolean | adjustRate(JSSample sample) Gradually change rate scale factor
If the rate change is too great suddenly, it sounds like a
jump, so we need to change gradually over time. | public void | cleanup() | boolean | close() | public synchronized void | doWork() This method performs one iteration of pending work to do
Wildly "garbled" sounds was caused by unequal changes in delta
time verses delta distances (resulting in jumps in rate factors
calculated for Doppler. | int | getTotalChannels() | public void | initialize() This initializes this thread. | void | muteSample(JSSample sample) | void | pauseSample(JSSample sample) | void | setRate(JSSample sample, float rateScaleFactor) | void | setSampleDelay(JSSample sample, JSAuralParameters attribs) | void | setSampleGain(JSSample sample, JSAuralParameters attribs) | void | setSampleGain(JSSample sample, float gain) | void | setSampleRate(JSSample sample, JSAuralParameters attribs) | void | setSampleRate(JSSample sample, float scaleFactor) | void | setTargetGain(JSSample sample, float scaleFactor) | void | setTargetRate(JSSample sample, float rateScaleFactor) | public void | shutdown() | int | startClip() | int | startClips() | boolean | startSample(JSSample sample) | int | startStream() | int | startStreams() | boolean | stopSample(JSSample sample) | void | unmuteSample(JSSample sample) | void | unpauseSample(JSSample sample) |
audioEngine | AudioEngine3D audioEngine(Code) | | TODO:
scalefactors applied to current sample rate to determine delta changes
in rate (in Hz)
float currentGain = 1.0f;
float targetGain = 1.0f;
|
rampGain | boolean rampGain(Code) | | flags denoting if dynamic gain or rate interpolation is to be performed
|
rampRate | boolean rampRate(Code) | | |
totalChannels | int totalChannels(Code) | | The thread data for this thread
|
adjustRate | boolean adjustRate(JSSample sample)(Code) | | Gradually change rate scale factor
If the rate change is too great suddenly, it sounds like a
jump, so we need to change gradually over time.
Since an octive delta change up is 2.0 but down is 0.5, forced
"max" rate of change is different for both.
true if target rate value was reached |
cleanup | public void cleanup()(Code) | | |
close | boolean close()(Code) | | Code to close the device
flag: true is closed sucessfully, false if error |
doWork | public synchronized void doWork()(Code) | | This method performs one iteration of pending work to do
Wildly "garbled" sounds was caused by unequal changes in delta
time verses delta distances (resulting in jumps in rate factors
calculated for Doppler. This work thread is meant to smoothly
increment/decrement changes in rate (and other future parameters)
until the target value is reached.
|
getTotalChannels | int getTotalChannels()(Code) | | |
initialize | public void initialize()(Code) | | This initializes this thread. Once this method returns, the thread is
ready to do work.
|
setSampleRate | void setSampleRate(JSSample sample, float scaleFactor)(Code) | | |
setTargetGain | void setTargetGain(JSSample sample, float scaleFactor)(Code) | | |
setTargetRate | void setTargetRate(JSSample sample, float rateScaleFactor)(Code) | | |
shutdown | public void shutdown()(Code) | | |
startClip | int startClip()(Code) | | |
startClips | int startClips()(Code) | | |
startStream | int startStream()(Code) | | |
startStreams | int startStreams()(Code) | | |
|
|