public class JavaSoundMixer extends AudioEngine3DL2
| Modifier and Type | Field and Description |
|---|---|
protected float |
deviceGain |
protected static int |
NOT_PAUSED |
protected int |
pause |
protected static int |
PAUSE_PENDING |
protected static int |
PAUSED |
protected static int |
RESUME_PENDING |
attribs, currentView, samplesBACKGROUND_SOUND, BUFFERED_AUDIO_DATA, CONE_SOUND, POINT_SOUND, STREAMING_AUDIO_DATAHEADPHONES, MONO_SPEAKER, STEREO_SPEAKERS| Constructor and Description |
|---|
JavaSoundMixer(PhysicalEnvironment physicalEnvironment) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearSound(int index)
Clears the fields associated with sample data for this sound.
|
boolean |
close()
Code to close the device.
|
int |
getNumberOfChannelsUsed(int index)
Get number of channels used by a particular sample on the audio device.
|
int |
getNumberOfChannelsUsed(int index,
boolean muted)
Overriden method from AudioEngine3D.
|
long |
getSampleDuration(int index)
Get length of time a sample would play if allowed to play to completion.
|
long |
getStartTime(int index)
Get time this sample begun playing on the audio device.
|
int |
getTotalChannels()
Query total number of channels available for sound rendering
for this audio device.
|
boolean |
initialize()
Code to initialize the device
New interface to mixer/engine specific methods
|
void |
muteSample(int index)
Mute sample.
|
void |
pause()
Pauses audio device engine without closing the device and associated
threads.
|
void |
pauseSample(int index)
Pause sample.
|
int |
prepareSound(int soundType,
MediaContainer soundData)
Code to load sound data into a channel of device mixer.
|
void |
resume()
Resumes audio device engine (if previously paused) without reinitializing * the device.
|
void |
setDirection(int index,
Vector3d direction)
Set direction vector of sample.
|
void |
setGain(float scaleFactor)
Set overall gain control of all sounds playing on the audio device.
|
void |
setLoop(int index,
int count)
Set number of times sample is looped.
|
void |
setPosition(int index,
Point3d position)
Set location of sample.
|
void |
setRateScaleFactor(int index,
float rateScaleFactor)
Set scale factor applied to sample playback rate for a particular sound
associated with the audio device.
|
void |
setReflectionCoefficient(float coefficient)
Set reverberation surface reflection coefficient value for current aural
attribute applied to all samples.
|
void |
setReverbDelay(float reverbDelay)
Set reverberation delay time for current aural attribute applied to
all samples.
|
void |
setReverbOrder(int reverbOrder)
Set reverberation order for current aural attribute applied to all
samples.
|
void |
setVworldXfrm(int index,
Transform3D trans)
Save a reference to the local to virtual world coordinate space
Overriden method from AudioEngine3D.
|
int |
startSample(int index)
Start sample playing on audio device
|
int |
stopSample(int index)
Stop sample playing on audio device
|
void |
unmuteSample(int index)
Unmute sample.
|
void |
unpauseSample(int index)
Unpause sample.
|
void |
updateSample(int index)
Update sample.
|
setDecayFilter, setDecayTime, setDensity, setDiffusion, setObstructionFilter, setObstructionGain, setOcclusionFilter, setOcclusionGain, setReflectionDelay, setReverbCoefficientgetAuralParameters, getSample, getSampleList, getSampleListSize, getView, setAngularAttenuation, setDistanceFilter, setDistanceGain, setFrequencyScaleFactor, setRolloff, setSampleGain, setVelocityScaleFactor, setViewgetAngleOffsetToSpeaker, getAudioPlaybackType, getCenterEarToSpeaker, getChannelsAvailable, getChannelsUsedForSound, setAngleOffsetToSpeaker, setAudioPlaybackType, setCenterEarToSpeakerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAngularAttenuation, setDistanceFilter, setDistanceGain, setFrequencyScaleFactor, setRolloff, setSampleGain, setVelocityScaleFactor, setViewgetAngleOffsetToSpeaker, getAudioPlaybackType, getCenterEarToSpeaker, getChannelsAvailable, getChannelsUsedForSound, setAngleOffsetToSpeaker, setAudioPlaybackType, setCenterEarToSpeakerprotected float deviceGain
protected static final int NOT_PAUSED
protected static final int PAUSE_PENDING
protected static final int PAUSED
protected static final int RESUME_PENDING
protected int pause
public JavaSoundMixer(PhysicalEnvironment physicalEnvironment)
public int getTotalChannels()
getTotalChannels in interface AudioDevicegetTotalChannels in class AudioEnginepublic boolean initialize()
initialize in interface AudioDeviceinitialize in class AudioEnginepublic boolean close()
close in interface AudioDeviceclose in class AudioEnginepublic int prepareSound(int soundType,
MediaContainer soundData)
prepareSound in interface AudioDevice3DprepareSound in class AudioEngine3DsoundType - denotes type of sound: Background, Point or ConesoundData - descrition of sound source datapublic void clearSound(int index)
clearSound in interface AudioDevice3DclearSound in class AudioEngine3Dindex - device specific reference number to device driver samplepublic void setVworldXfrm(int index,
Transform3D trans)
setVworldXfrm in interface AudioDevice3DsetVworldXfrm in class AudioEngine3Dindex - device specific reference number to device driver sampletrans - is a reference to virtual world composite transformpublic void setPosition(int index,
Point3d position)
AudioEngine3DsetPosition in interface AudioDevice3DsetPosition in class AudioEngine3Dindex - device specific reference number to device driver sampleposition - point location in virtual world coordinate of samplePointSound.setPosition(float x, float y, float z),
PointSound.setPosition(Point3f position)public void setDirection(int index,
Vector3d direction)
AudioEngine3DsetDirection in interface AudioDevice3DsetDirection in class AudioEngine3Dindex - device specific reference number to device driver sampledirection - vector in virtual world coordinate.ConeSound.setDirection(float x, float y, float z),
ConeSound.setDirection(Vector3f direction)public void setReflectionCoefficient(float coefficient)
AudioEngine3DsetReflectionCoefficient in interface AudioDevice3DsetReflectionCoefficient in class AudioEngine3Dcoefficient - applied to amplitude of reverbation added at each
iteration of reverb processing.AuralAttributes.setReflectionCoefficient(float)public void setReverbDelay(float reverbDelay)
AudioEngine3DsetReverbDelay in interface AudioDevice3DsetReverbDelay in class AudioEngine3DreverbDelay - amount of time in millisecond between each
iteration of reverb processing.AuralAttributes.setReverbDelay(float reverbDelay)public void setReverbOrder(int reverbOrder)
AudioEngine3DsetReverbOrder in interface AudioDevice3DsetReverbOrder in class AudioEngine3DreverbOrder - number of times reverb process loop is iterated.AuralAttributes.setReverbOrder(int)public int startSample(int index)
AudioEngine3DstartSample in interface AudioDevice3DstartSample in class AudioEngine3Dindex - device specific reference number to device driver samplepublic int stopSample(int index)
AudioEngine3DstopSample in interface AudioDevice3DstopSample in class AudioEngine3Dindex - device specific reference number to device driver samplepublic void pauseSample(int index)
AudioEngine3DpauseSample in interface AudioDevice3DpauseSample in class AudioEngine3Dindex - device specific reference number to device driver samplepublic void unpauseSample(int index)
AudioEngine3DunpauseSample in interface AudioDevice3DunpauseSample in class AudioEngine3Dindex - device specific reference number to device driver samplepublic void updateSample(int index)
AudioEngine3DupdateSample in interface AudioDevice3DupdateSample in class AudioEngine3Dindex - device specific reference number to device driver samplepublic void muteSample(int index)
AudioEngine3DmuteSample in interface AudioDevice3DmuteSample in class AudioEngine3Dindex - device specific reference number to device driver samplepublic void unmuteSample(int index)
AudioEngine3DunmuteSample in interface AudioDevice3DunmuteSample in class AudioEngine3Dindex - device specific reference number to device driver samplepublic long getSampleDuration(int index)
AudioEngine3DgetSampleDuration in interface AudioDevice3DgetSampleDuration in class AudioEngine3Dindex - device specific reference number to device driver samplepublic int getNumberOfChannelsUsed(int index)
AudioEngine3DgetNumberOfChannelsUsed in interface AudioDevice3DgetNumberOfChannelsUsed in class AudioEngine3Dindex - device specific reference number to device driver samplepublic int getNumberOfChannelsUsed(int index,
boolean muted)
getNumberOfChannelsUsed in interface AudioDevice3DgetNumberOfChannelsUsed in class AudioEngine3Dindex - device specific reference number to device driver samplemuted - denotes the mute state to assume while executing this
query. This mute value does not have to match the current mute state
of the sample.public long getStartTime(int index)
AudioEngine3DgetStartTime in interface AudioDevice3DgetStartTime in class AudioEngine3Dindex - device specific reference number to device driver samplepublic void setLoop(int index,
int count)
AudioEngine3DsetLoop in interface AudioDevice3DsetLoop in class AudioEngine3Dindex - device specific reference number to device driver samplecount - number of times sample is repeatedSound.setLoop(int)public void setGain(float scaleFactor)
AudioEngine3DL2setGain in interface AudioDevice3DL2setGain in class AudioEngine3DL2scaleFactor - scale factor applied to calculated amplitudes for
all sounds playing on this devicepublic void setRateScaleFactor(int index,
float rateScaleFactor)
AudioEngine3DL2setRateScaleFactor in interface AudioDevice3DL2setRateScaleFactor in class AudioEngine3DL2index - device specific reference to device driver samplerateScaleFactor - non-negative factor applied to calculated
amplitudes for all sounds playing on this deviceSound.setRateScaleFactor(float)public void pause()
pause in interface AudioDevice3DL2pause in class AudioEngine3DL2public void resume()
resume in interface AudioDevice3DL2resume in class AudioEngine3DL2Copyright © 2016–2022 SciJava. All rights reserved.