- _busLayoutChanged
void _busLayoutChanged()
- _isActive
bool _isActive()
- _setPlaying
void _setPlaying(bool enable)
- getAreaMask
long getAreaMask()
- getAttenuationFilterCutoffHz
double getAttenuationFilterCutoffHz()
- getAttenuationFilterDb
double getAttenuationFilterDb()
- getAttenuationModel
AudioStreamPlayer3D.AttenuationModel getAttenuationModel()
- getBus
String getBus()
- getDopplerTracking
AudioStreamPlayer3D.DopplerTracking getDopplerTracking()
- getEmissionAngle
double getEmissionAngle()
- getEmissionAngleFilterAttenuationDb
double getEmissionAngleFilterAttenuationDb()
- getMaxDb
double getMaxDb()
- getMaxDistance
double getMaxDistance()
- getOutOfRangeMode
AudioStreamPlayer3D.OutOfRangeMode getOutOfRangeMode()
- getPitchScale
double getPitchScale()
- getPlaybackPosition
double getPlaybackPosition()
- getStream
Ref!AudioStream getStream()
- getStreamPaused
bool getStreamPaused()
- getStreamPlayback
Ref!AudioStreamPlayback getStreamPlayback()
- getUnitDb
double getUnitDb()
- getUnitSize
double getUnitSize()
- isAutoplayEnabled
bool isAutoplayEnabled()
- isEmissionAngleEnabled
bool isEmissionAngleEnabled()
- isPlaying
bool isPlaying()
- opAssign
typeof(null) opAssign(typeof(null) n)
- opEquals
bool opEquals(AudioStreamPlayer3D other)
- opEquals
bool opEquals(typeof(null) n)
- play
void play(double from_position)
Plays the audio from the given position from_position, in seconds.
- seek
void seek(double to_position)
Sets the position from which audio will be played, in seconds.
- setAreaMask
void setAreaMask(long mask)
- setAttenuationFilterCutoffHz
void setAttenuationFilterCutoffHz(double degrees)
- setAttenuationFilterDb
void setAttenuationFilterDb(double db)
- setAttenuationModel
void setAttenuationModel(long model)
- setAutoplay
void setAutoplay(bool enable)
- setBus
void setBus(String bus)
- setDopplerTracking
void setDopplerTracking(long mode)
- setEmissionAngle
void setEmissionAngle(double degrees)
- setEmissionAngleEnabled
void setEmissionAngleEnabled(bool enabled)
- setEmissionAngleFilterAttenuationDb
void setEmissionAngleFilterAttenuationDb(double db)
- setMaxDb
void setMaxDb(double max_db)
- setMaxDistance
void setMaxDistance(double metres)
- setOutOfRangeMode
void setOutOfRangeMode(long mode)
- setPitchScale
void setPitchScale(double pitch_scale)
- setStream
void setStream(AudioStream stream)
- setStreamPaused
void setStreamPaused(bool pause)
- setUnitDb
void setUnitDb(double unit_db)
- setUnitSize
void setUnitSize(double unit_size)
- stop
void stop()
- toHash
size_t toHash()
- areaMask
long areaMask [@property getter]
long areaMask [@property setter]
Areas in which this sound plays.
- attenuationFilterCutoffHz
double attenuationFilterCutoffHz [@property getter]
double attenuationFilterCutoffHz [@property setter]
Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to 20500 as this frequency is above the human hearing limit.
- attenuationFilterDb
double attenuationFilterDb [@property getter]
double attenuationFilterDb [@property setter]
Amount how much the filter affects the loudness, in decibels.
- attenuationModel
AudioStreamPlayer3D.AttenuationModel attenuationModel [@property getter]
long attenuationModel [@property setter]
Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation.
- autoplay
bool autoplay [@property getter]
bool autoplay [@property setter]
If true, audio plays when the AudioStreamPlayer3D node is added to scene tree.
- bus
String bus [@property getter]
String bus [@property setter]
The bus on which this audio is playing.
- dopplerTracking
AudioStreamPlayer3D.DopplerTracking dopplerTracking [@property getter]
long dopplerTracking [@property setter]
Decides in which step the Doppler effect should be calculated.
- emissionAngleDegrees
double emissionAngleDegrees [@property getter]
double emissionAngleDegrees [@property setter]
The angle in which the audio reaches cameras undampened.
- emissionAngleEnabled
bool emissionAngleEnabled [@property getter]
bool emissionAngleEnabled [@property setter]
If true, the audio should be dampened according to the direction of the sound.
- emissionAngleFilterAttenuationDb
double emissionAngleFilterAttenuationDb [@property getter]
double emissionAngleFilterAttenuationDb [@property setter]
- maxDb
double maxDb [@property getter]
double maxDb [@property setter]
Sets the absolute maximum of the soundlevel, in decibels.
- maxDistance
double maxDistance [@property getter]
double maxDistance [@property setter]
Sets the distance from which the outOfRangeMode takes effect. Has no effect if set to 0.
- outOfRangeMode
AudioStreamPlayer3D.OutOfRangeMode outOfRangeMode [@property getter]
long outOfRangeMode [@property setter]
Decides if audio should pause when source is outside of maxDistance range.
- pitchScale
double pitchScale [@property getter]
double pitchScale [@property setter]
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
- playing
bool playing [@property getter]
bool playing [@property setter]
If true, audio is playing.
- stream
AudioStream stream [@property getter]
AudioStream stream [@property setter]
- streamPaused
bool streamPaused [@property getter]
bool streamPaused [@property setter]
If true, the playback is paused. You can resume it by setting streamPaused to false.
- unitDb
double unitDb [@property getter]
double unitDb [@property setter]
The base sound level unaffected by dampening, in decibels.
- unitSize
double unitSize [@property getter]
double unitSize [@property setter]
The factor for the attenuation effect. Higher values make the sound audible over a larger distance.
Plays positional sound in 3D space.
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting attenuationFilterCutoffHz to 20500. By default, audio is heard from the camera position. This can be changed by adding a Listener node to the scene and enabling it by calling Listener.makeCurrent on it. See also AudioStreamPlayer to play a sound non-positionally. Note: Hiding an AudioStreamPlayer3D node does not disable its audio output. To temporarily disable an AudioStreamPlayer3D's audio output, set unitDb to a very low value like -100 (which isn't audible to human hearing).