Struct AudioStreamPlayer3D
Plays 3D sound in 3D space.
struct AudioStreamPlayer3D
;
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space.
Properties
Name | Type | Description |
---|---|---|
areaMask [get, set]
|
long | Areas in which this sound plays. |
attenuationFilterCutoffHz [get, set]
|
double | Dampens audio above this frequency, in Hz. |
attenuationFilterDb [get, set]
|
double | Amount how much the filter affects the loudness, in dB. |
attenuationModel [get, set]
|
AudioStreamPlayer3D | Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation. |
autoplay [get, set]
|
bool | If true , audio plays when added to scene tree.
|
bus [get, set]
|
String | Bus on which this audio is playing. |
dopplerTracking [get, set]
|
AudioStreamPlayer3D | Decides in which step the Doppler effect should be calculated. |
emissionAngleDegrees [get, set]
|
double | The angle in which the audio reaches cameras undampened. |
emissionAngleEnabled [get, set]
|
bool | If true , the audio should be dampened according to the direction of the sound.
|
emissionAngleFilterAttenuationDb [get, set]
|
double | Dampens audio if camera is outside of emissionAngleDegrees and emissionAngleEnabled is set by this factor, in dB.
|
maxDb [get, set]
|
double | Sets the absolute maximum of the soundlevel, in dB. |
maxDistance [get, set]
|
double | Sets the distance from which the outOfRangeMode takes effect. Has no effect if set to 0.
|
outOfRangeMode [get, set]
|
AudioStreamPlayer3D | Decides if audio should pause when source is outside of maxDistance range.
|
pitchScale [get, set]
|
double | Changes the pitch and the tempo of the audio. |
playing [get, set]
|
bool | If true , audio is playing.
|
stream [get, set]
|
AudioStream | The AudioStream object to be played.
|
streamPaused [get, set]
|
bool | If true , the playback is paused. You can resume it by setting stream_paused to false .
|
unitDb [get, set]
|
double | Base sound level unaffected by dampening, in dB. |
unitSize [get, set]
|
double | Factor for the attenuation effect. |
Methods
Name | Description |
---|---|
_busLayoutChanged
|
|
_isActive
|
|
_setPlaying
|
|
getAreaMask
|
|
getAttenuationFilterCutoffHz
|
|
getAttenuationFilterDb
|
|
getAttenuationModel
|
|
getBus
|
|
getDopplerTracking
|
|
getEmissionAngle
|
|
getEmissionAngleFilterAttenuationDb
|
|
getMaxDb
|
|
getMaxDistance
|
|
getOutOfRangeMode
|
|
getPitchScale
|
|
getPlaybackPosition
|
Returns the position in the AudioStream .
|
getStream
|
|
getStreamPaused
|
|
getStreamPlayback
|
Returns the AudioStreamPlayback object associated with this AudioStreamPlayer3D .
|
getUnitDb
|
|
getUnitSize
|
|
isAutoplayEnabled
|
|
isEmissionAngleEnabled
|
|
isPlaying
|
|
play
|
Plays the audio from the given position from_position , in seconds.
|
seek
|
Sets the position from which audio will be played, in seconds. |
setAreaMask
|
|
setAttenuationFilterCutoffHz
|
|
setAttenuationFilterDb
|
|
setAttenuationModel
|
|
setAutoplay
|
|
setBus
|
|
setDopplerTracking
|
|
setEmissionAngle
|
|
setEmissionAngleEnabled
|
|
setEmissionAngleFilterAttenuationDb
|
|
setMaxDb
|
|
setMaxDistance
|
|
setOutOfRangeMode
|
|
setPitchScale
|
|
setStream
|
|
setStreamPaused
|
|
setUnitDb
|
|
setUnitSize
|
|
stop
|
Stops the audio. |
Enums
Name | Description |
---|---|
AttenuationModel
|
|
Constants
|
|
DopplerTracking
|
|
OutOfRangeMode
|