123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the AudioStreamPlayer.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_AudioStreamPlayer:
- AudioStreamPlayer
- =================
- **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Plays back audio.
- Member Functions
- ----------------
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`get_bus<class_AudioStreamPlayer_get_bus>` **(** **)** const |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_mix_target<class_AudioStreamPlayer_get_mix_target>` **(** **)** const |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_position<class_AudioStreamPlayer_get_position>` **(** **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | :ref:`AudioStream<class_audiostream>` | :ref:`get_stream<class_AudioStreamPlayer_get_stream>` **(** **)** const |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_volume_db<class_AudioStreamPlayer_get_volume_db>` **(** **)** const |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_autoplay_enabled<class_AudioStreamPlayer_is_autoplay_enabled>` **(** **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_playing<class_AudioStreamPlayer_is_playing>` **(** **)** const |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`play<class_AudioStreamPlayer_play>` **(** :ref:`float<class_float>` from_position=0.0 **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`seek<class_AudioStreamPlayer_seek>` **(** :ref:`float<class_float>` to_position **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_autoplay<class_AudioStreamPlayer_set_autoplay>` **(** :ref:`bool<class_bool>` enable **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bus<class_AudioStreamPlayer_set_bus>` **(** :ref:`String<class_string>` bus **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_mix_target<class_AudioStreamPlayer_set_mix_target>` **(** :ref:`int<class_int>` mix_target **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_stream<class_AudioStreamPlayer_set_stream>` **(** :ref:`AudioStream<class_audiostream>` stream **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_volume_db<class_AudioStreamPlayer_set_volume_db>` **(** :ref:`float<class_float>` volume_db **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`stop<class_AudioStreamPlayer_stop>` **(** **)** |
- +----------------------------------------+------------------------------------------------------------------------------------------------------------------+
- Signals
- -------
- - **finished** **(** **)**
- Emitted when the audio stops playing.
- Member Variables
- ----------------
- - :ref:`bool<class_bool>` **autoplay** - If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code].
- - :ref:`String<class_string>` **bus** - Bus on which this audio is playing.
- - :ref:`int<class_int>` **mix_target**
- - :ref:`bool<class_bool>` **playing** - If [code]true[/code], audio is playing.
- - :ref:`AudioStream<class_audiostream>` **stream** - The [AudioStream] object to be played.
- - :ref:`float<class_float>` **volume_db** - Volume of sound, in dB.
- Numeric Constants
- -----------------
- - **MIX_TARGET_STEREO** = **0**
- - **MIX_TARGET_SURROUND** = **1**
- - **MIX_TARGET_CENTER** = **2**
- Description
- -----------
- Plays background audio.
- Member Function Description
- ---------------------------
- .. _class_AudioStreamPlayer_get_bus:
- - :ref:`String<class_string>` **get_bus** **(** **)** const
- .. _class_AudioStreamPlayer_get_mix_target:
- - :ref:`int<class_int>` **get_mix_target** **(** **)** const
- .. _class_AudioStreamPlayer_get_position:
- - :ref:`float<class_float>` **get_position** **(** **)**
- .. _class_AudioStreamPlayer_get_stream:
- - :ref:`AudioStream<class_audiostream>` **get_stream** **(** **)** const
- .. _class_AudioStreamPlayer_get_volume_db:
- - :ref:`float<class_float>` **get_volume_db** **(** **)** const
- .. _class_AudioStreamPlayer_is_autoplay_enabled:
- - :ref:`bool<class_bool>` **is_autoplay_enabled** **(** **)**
- .. _class_AudioStreamPlayer_is_playing:
- - :ref:`bool<class_bool>` **is_playing** **(** **)** const
- .. _class_AudioStreamPlayer_play:
- - void **play** **(** :ref:`float<class_float>` from_position=0.0 **)**
- Plays the audio from the given position 'from_position', in seconds.
- .. _class_AudioStreamPlayer_seek:
- - void **seek** **(** :ref:`float<class_float>` to_position **)**
- Sets the position from which audio will be played, in seconds.
- .. _class_AudioStreamPlayer_set_autoplay:
- - void **set_autoplay** **(** :ref:`bool<class_bool>` enable **)**
- .. _class_AudioStreamPlayer_set_bus:
- - void **set_bus** **(** :ref:`String<class_string>` bus **)**
- .. _class_AudioStreamPlayer_set_mix_target:
- - void **set_mix_target** **(** :ref:`int<class_int>` mix_target **)**
- .. _class_AudioStreamPlayer_set_stream:
- - void **set_stream** **(** :ref:`AudioStream<class_audiostream>` stream **)**
- .. _class_AudioStreamPlayer_set_volume_db:
- - void **set_volume_db** **(** :ref:`float<class_float>` volume_db **)**
- .. _class_AudioStreamPlayer_stop:
- - void **stop** **(** **)**
- Stops the audio.
|