public interface AudioDevice3DL2 extends AudioDevice3D
The reverberation methods of AudioDevice3DL2 interface augment the reverberation methods defined in AudioDevice3D.
The intent is for this interface to be implemented by AudioDevice Driver developers using a software or hardware sound engine of their choice.
Methods in this interface provide the Java3D Core a generic way to set and query the audio device the application has chosen audio rendering to be performed on.
The non-query methods of this interface should only be called by an application if the AudioDevice instance is not referenced by any PhysicalEnvironment explicitly with .setAudioDevice() or implicitly through Universe utility method in which case these are called by Core Java 3D Sound classes and Sound Scheduler thread(s).
After the application chooses the AudioDevice3DL2 implementation that Java3D sound is to be rendered on, the Java 3D Sound Scheduler will call these methods for all active sounds to render them on the audio device.
The AudioDevice3DL2 methods should not be call by any application if the audio device is associated with a Physical Environment and thus used by Java3D Core.
Filtering for this extended AudioDevice interface is defined uniformly as a simple low-pass filter defined by a cutoff frequency. This will allow the same type of high-frequency attenuation that the MMA IASIG Level 2 filtering model with its 'reference frequency' and 'attenuation ratio' parameters affords. Use of a cutoff frequency is consistent with the filtering type for distance and angular attenuation for ConeSound and AuralAttributes. The filter methods will likely be overloaded in some future extension of this interface.
Sound
,
AuralAttributes
,
AudioDevice3D
BACKGROUND_SOUND, BUFFERED_AUDIO_DATA, CONE_SOUND, POINT_SOUND, STREAMING_AUDIO_DATA
HEADPHONES, MONO_SPEAKER, STEREO_SPEAKERS
Modifier and Type | Method and Description |
---|---|
void |
pause()
Pause audio device engine (thread/server) without closing the device.
|
void |
resume()
Resumes audio device engine (if previously paused) without reinitializing
the device.
|
void |
setDecayFilter(float frequencyCutoff)
Set reverb decay filter.
|
void |
setDecayTime(float time)
Set reverb decay time.
|
void |
setDensity(float density)
Set reverb density.
|
void |
setDiffusion(float diffusion)
Set reverb diffusion.
|
void |
setGain(float scaleFactor)
Set overall gain control of all sounds playing on the audio device.
|
void |
setObstructionFilter(int sampleId,
float frequencyCutoff)
Set the obstruction filter control.
|
void |
setObstructionGain(int sampleId,
float scaleFactor)
Set the obstruction gain control.
|
void |
setOcclusionFilter(int sampleId,
float frequencyCutoff)
Set the occlusion filter control.
|
void |
setOcclusionGain(int sampleId,
float scaleFactor)
Set the occlusion gain control.
|
void |
setRateScaleFactor(int sampleId,
float scaleFactor)
Set scale factor applied to sample playback rate for a particular sound
associated with the audio device.
|
void |
setReflectionDelay(float reflectionDelay)
Sets the early reflection delay time.
|
void |
setReverbCoefficient(float coefficient)
Set late reflection (referred to as 'reverb') attenuation.
|
clearSound, getNumberOfChannelsUsed, getNumberOfChannelsUsed, getSampleDuration, getStartTime, muteSample, pauseSample, prepareSound, setAngularAttenuation, setDirection, setDistanceFilter, setDistanceGain, setFrequencyScaleFactor, setLoop, setPosition, setReflectionCoefficient, setReverbDelay, setReverbOrder, setRolloff, setSampleGain, setVelocityScaleFactor, setView, setVworldXfrm, startSample, stopSample, unmuteSample, unpauseSample, updateSample
close, getAngleOffsetToSpeaker, getAudioPlaybackType, getCenterEarToSpeaker, getChannelsAvailable, getChannelsUsedForSound, getTotalChannels, initialize, setAngleOffsetToSpeaker, setAudioPlaybackType, setCenterEarToSpeaker
void pause()
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core. This method will be implicitly called when View (associated with this device) is deactivated.
void resume()
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core. This method will be implicitly called when View (associated with this device) is actived.
void setGain(float scaleFactor)
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
scaleFactor
- scale factor applied to calculated amplitudes for
all sounds playing on this devicevoid setRateScaleFactor(int sampleId, float scaleFactor)
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
sampleId
- device specific reference number to device driver samplescaleFactor
- non-negative factor applied to calculated
amplitudes for all sounds playing on this devicevoid setReverbCoefficient(float coefficient)
A full description of this parameter and how it is used is in the documentation for the AuralAttributes class.
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
coefficient
- late reflection attenuation factorAuralAttributes.setReverbCoefficient(float)
void setReflectionDelay(float reflectionDelay)
A full description of this parameter and how it is used is in the documentation for the AuralAttributes class.
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
reflectionDelay
- time between each order of early reflectionAuralAttributes.setReflectionDelay(float)
void setDecayTime(float time)
A full description of this parameter and how it is used is in the documentation for the AuralAttributes class.
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
time
- decay time in millisecondsAuralAttributes.setDecayTime(float)
void setDecayFilter(float frequencyCutoff)
There is no corresponding Core AuralAttributes method at this time. Until high frequency attenuation is supported by new Core API, this will be set by the Core with the value 1.0. It is highly recommended that this method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
frequencyCutoff
- value of frequencies in Hertz above which a
low-pass filter is applied.AuralAttributes.setDecayFilter(float)
void setDiffusion(float diffusion)
A full description of this parameter and how it is used is in the documentation for the AuralAttributes class.
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
diffusion
- percentage expressed within the range of 0.0 and 1.0AuralAttributes.setDiffusion(float)
void setDensity(float density)
A full description of this parameter and how it is used is in the documentation for the AuralAttributes class.
This method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
density
- reverb density expressed as a percentage,
within the range of 0.0 and 1.0AuralAttributes.setDensity(float)
void setObstructionGain(int sampleId, float scaleFactor)
There is no corresponding Core AuralAttributes method at this time. Even so, this method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
sampleId
- device specific reference number to device driver samplescaleFactor
- non-negative factor applied to direct sound gainvoid setObstructionFilter(int sampleId, float frequencyCutoff)
There is no corresponding Core AuralAttributes method at this time. Until high frequency attenuation is supported by new Core API this will be set by the Core with the value 1.0. It is highly recommended that this method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
frequencyCutoff
- value of frequencies in Hertz above which a
low-pass filter is applied.void setOcclusionGain(int sampleId, float scaleFactor)
There is no corresponding Core AuralAttributes method at this time. Even so, this method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
sampleId
- device specific reference number to device driver samplescaleFactor
- non-negative factor applied to direct sound gainvoid setOcclusionFilter(int sampleId, float frequencyCutoff)
There is no corresponding Core AuralAttributes method at this time. Until high frequency attenuation is supported by new Core API this will be set by the Core with the value 1.0. It is highly recommended that this method should NOT be called by any application if the audio device is associated with a Physical Environment used by Java3D Core.
frequencyCutoff
- value of frequencies in Hertz above which a
low-pass filter is applied.Copyright © 2016–2022 SciJava. All rights reserved.