.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the AudioStreamPlayer3D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_AudioStreamPlayer3D: AudioStreamPlayer3D =================== **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Plays 3D sound in 3D space. Member Functions ---------------- +----------------------------+-----------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_playback_position` **(** **)** | +----------------------------+-----------------------------------------------------------------------------------------------------+ | void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | +----------------------------+-----------------------------------------------------------------------------------------------------+ | void | :ref:`seek` **(** :ref:`float` to_position **)** | +----------------------------+-----------------------------------------------------------------------------------------------------+ | void | :ref:`stop` **(** **)** | +----------------------------+-----------------------------------------------------------------------------------------------------+ Signals ------- .. _class_AudioStreamPlayer3D_finished: - **finished** **(** **)** Fires when the audio stops playing. Member Variables ---------------- .. _class_AudioStreamPlayer3D_area_mask: - :ref:`int` **area_mask** - Areas in which this sound plays. .. _class_AudioStreamPlayer3D_attenuation_filter_cutoff_hz: - :ref:`float` **attenuation_filter_cutoff_hz** - Dampens audio above this frequency, in Hz. .. _class_AudioStreamPlayer3D_attenuation_filter_db: - :ref:`float` **attenuation_filter_db** - Amount how much the filter affects the loudness, in dB. .. _class_AudioStreamPlayer3D_attenuation_model: - :ref:`AttenuationModel` **attenuation_model** - Decides if audio should get quieter with distance linearly, quadratically or logarithmically. .. _class_AudioStreamPlayer3D_autoplay: - :ref:`bool` **autoplay** - If ``true`` audio plays when added to scene tree. Default value: ``false``. .. _class_AudioStreamPlayer3D_bus: - :ref:`String` **bus** - Bus on which this audio is playing. .. _class_AudioStreamPlayer3D_doppler_tracking: - :ref:`DopplerTracking` **doppler_tracking** - Decides in which step the Doppler effect should be calculated. .. _class_AudioStreamPlayer3D_emission_angle_degrees: - :ref:`float` **emission_angle_degrees** - The angle in which the audio reaches cameras undampened. .. _class_AudioStreamPlayer3D_emission_angle_enabled: - :ref:`bool` **emission_angle_enabled** - If ``true`` the audio should be dampened according to the direction of the sound. .. _class_AudioStreamPlayer3D_emission_angle_filter_attenuation_db: - :ref:`float` **emission_angle_filter_attenuation_db** - dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. .. _class_AudioStreamPlayer3D_max_db: - :ref:`float` **max_db** - Sets the absolute maximum of the soundlevel, in dB. .. _class_AudioStreamPlayer3D_max_distance: - :ref:`float` **max_distance** - Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0. .. _class_AudioStreamPlayer3D_out_of_range_mode: - :ref:`OutOfRangeMode` **out_of_range_mode** - Decides if audio should pause when source is outside of 'max_distance' range. .. _class_AudioStreamPlayer3D_pitch_scale: - :ref:`float` **pitch_scale** - Changes the pitch and the tempo of the audio. .. _class_AudioStreamPlayer3D_playing: - :ref:`bool` **playing** - If ``true``, audio is playing. .. _class_AudioStreamPlayer3D_stream: - :ref:`AudioStream` **stream** - The :ref:`AudioStream` object to be played. .. _class_AudioStreamPlayer3D_unit_db: - :ref:`float` **unit_db** - Base sound level unaffected by dampening, in dB. .. _class_AudioStreamPlayer3D_unit_size: - :ref:`float` **unit_size** - Factor for the attenuation effect. Enums ----- .. _enum_AudioStreamPlayer3D_DopplerTracking: enum **DopplerTracking** - **DOPPLER_TRACKING_DISABLED** = **0** --- Disables doppler tracking. - **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Executes doppler tracking in idle step. - **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Executes doppler tracking in physics step. .. _enum_AudioStreamPlayer3D_OutOfRangeMode: enum **OutOfRangeMode** - **OUT_OF_RANGE_MIX** = **0** --- Mix this audio in, even when it's out of range. - **OUT_OF_RANGE_PAUSE** = **1** --- Pause this audio when it gets out of range. .. _enum_AudioStreamPlayer3D_AttenuationModel: enum **AttenuationModel** - **ATTENUATION_INVERSE_DISTANCE** = **0** --- Linear dampening of loudness according to distance. - **ATTENUATION_INVERSE_SQUARE_DISTANCE** = **1** --- Squared dampening of loudness according to distance. - **ATTENUATION_LOGARITHMIC** = **2** --- Logarithmic dampening of loudness according to distance. Description ----------- Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. Member Function Description --------------------------- .. _class_AudioStreamPlayer3D_get_playback_position: - :ref:`float` **get_playback_position** **(** **)** Returns the position in the :ref:`AudioStream`. .. _class_AudioStreamPlayer3D_play: - void **play** **(** :ref:`float` from_position=0.0 **)** Plays the audio from the given position 'from_position', in seconds. .. _class_AudioStreamPlayer3D_seek: - void **seek** **(** :ref:`float` to_position **)** Sets the position from which audio will be played, in seconds. .. _class_AudioStreamPlayer3D_stop: - void **stop** **(** **)** Stops the audio.