Files
godot-docs/classes/class_audiostreamsample.rst
T

83 lines
2.8 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the AudioStreamSample.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_AudioStreamSample:
AudioStreamSample
=================
**Inherits:** :ref:`AudioStream<class_audiostream>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
**Category:** Core
Brief Description
-----------------
Plays audio.
Member Functions
----------------
+--------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`PoolByteArray<class_poolbytearray>` | :ref:`get_data<class_AudioStreamSample_get_data>` **(** **)** const |
+--------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_data<class_AudioStreamSample_set_data>` **(** :ref:`PoolByteArray<class_poolbytearray>` data **)** |
+--------------------------------------------+--------------------------------------------------------------------------------------------------------------+
Member Variables
----------------
.. _class_AudioStreamSample_format:
- :ref:`int<class_int>` **format** - Audio format. See FORMAT\_\* constants for values.
.. _class_AudioStreamSample_loop_begin:
- :ref:`int<class_int>` **loop_begin** - Loop start in bytes.
.. _class_AudioStreamSample_loop_end:
- :ref:`int<class_int>` **loop_end** - Loop end in bytes.
.. _class_AudioStreamSample_loop_mode:
- :ref:`int<class_int>` **loop_mode** - Loop mode. See LOOP\_\* constants for values.
.. _class_AudioStreamSample_mix_rate:
- :ref:`int<class_int>` **mix_rate** - The sample rate for mixing this audio.
.. _class_AudioStreamSample_stereo:
- :ref:`bool<class_bool>` **stereo** - If ``true``, audio is stereo. Default value: ``false``.
Numeric Constants
-----------------
- **FORMAT_8_BITS** = **0** --- Audio codec 8 bit.
- **FORMAT_16_BITS** = **1** --- Audio codec 16 bit.
- **FORMAT_IMA_ADPCM** = **2** --- Audio codec IMA ADPCM.
- **LOOP_DISABLED** = **0** --- Audio does not loop.
- **LOOP_FORWARD** = **1** --- Audio loops the data between loop_begin and loop_end playing forward only.
- **LOOP_PING_PONG** = **2** --- Audio loops the data between loop_begin and loop_end playing back and forth.
Description
-----------
Plays audio, can loop.
Member Function Description
---------------------------
.. _class_AudioStreamSample_get_data:
- :ref:`PoolByteArray<class_poolbytearray>` **get_data** **(** **)** const
.. _class_AudioStreamSample_set_data:
- void **set_data** **(** :ref:`PoolByteArray<class_poolbytearray>` data **)**