.. 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//doc_classes. .. _class_AudioStreamSample: AudioStreamSample ================= **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Plays audio. Properties ---------- +--------------------------------------------------+----------------------------------------------------------------+ | :ref:`PoolByteArray` | :ref:`data` | +--------------------------------------------------+----------------------------------------------------------------+ | :ref:`Format` | :ref:`format` | +--------------------------------------------------+----------------------------------------------------------------+ | :ref:`int` | :ref:`loop_begin` | +--------------------------------------------------+----------------------------------------------------------------+ | :ref:`int` | :ref:`loop_end` | +--------------------------------------------------+----------------------------------------------------------------+ | :ref:`LoopMode` | :ref:`loop_mode` | +--------------------------------------------------+----------------------------------------------------------------+ | :ref:`int` | :ref:`mix_rate` | +--------------------------------------------------+----------------------------------------------------------------+ | :ref:`bool` | :ref:`stereo` | +--------------------------------------------------+----------------------------------------------------------------+ Methods ------- +------+-------------------------------------------------------------------------------------------------------------+ | void | :ref:`save_to_wav` **(** :ref:`String` path **)** | +------+-------------------------------------------------------------------------------------------------------------+ Enumerations ------------ .. _enum_AudioStreamSample_Format: .. _class_AudioStreamSample_constant_FORMAT_8_BITS: .. _class_AudioStreamSample_constant_FORMAT_16_BITS: .. _class_AudioStreamSample_constant_FORMAT_IMA_ADPCM: enum **Format**: - **FORMAT_8_BITS** = **0** --- Audio codec 8 bit. - **FORMAT_16_BITS** = **1** --- Audio codec 16 bit. - **FORMAT_IMA_ADPCM** = **2** --- Audio codec IMA ADPCM. .. _enum_AudioStreamSample_LoopMode: .. _class_AudioStreamSample_constant_LOOP_DISABLED: .. _class_AudioStreamSample_constant_LOOP_FORWARD: .. _class_AudioStreamSample_constant_LOOP_PING_PONG: .. _class_AudioStreamSample_constant_LOOP_BACKWARD: enum **LoopMode**: - **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. - **LOOP_BACKWARD** = **3** --- Audio loops the data between loop_begin and loop_end playing backward only. Description ----------- Plays audio, can loop. Property Descriptions --------------------- .. _class_AudioStreamSample_property_data: - :ref:`PoolByteArray` **data** +----------+-----------------+ | *Setter* | set_data(value) | +----------+-----------------+ | *Getter* | get_data() | +----------+-----------------+ Contains the audio data in bytes. .. _class_AudioStreamSample_property_format: - :ref:`Format` **format** +----------+-------------------+ | *Setter* | set_format(value) | +----------+-------------------+ | *Getter* | get_format() | +----------+-------------------+ Audio format. See FORMAT\_\* constants for values. .. _class_AudioStreamSample_property_loop_begin: - :ref:`int` **loop_begin** +----------+-----------------------+ | *Setter* | set_loop_begin(value) | +----------+-----------------------+ | *Getter* | get_loop_begin() | +----------+-----------------------+ Loop start in bytes. .. _class_AudioStreamSample_property_loop_end: - :ref:`int` **loop_end** +----------+---------------------+ | *Setter* | set_loop_end(value) | +----------+---------------------+ | *Getter* | get_loop_end() | +----------+---------------------+ Loop end in bytes. .. _class_AudioStreamSample_property_loop_mode: - :ref:`LoopMode` **loop_mode** +----------+----------------------+ | *Setter* | set_loop_mode(value) | +----------+----------------------+ | *Getter* | get_loop_mode() | +----------+----------------------+ Loop mode. See LOOP\_\* constants for values. .. _class_AudioStreamSample_property_mix_rate: - :ref:`int` **mix_rate** +----------+---------------------+ | *Setter* | set_mix_rate(value) | +----------+---------------------+ | *Getter* | get_mix_rate() | +----------+---------------------+ The sample rate for mixing this audio. .. _class_AudioStreamSample_property_stereo: - :ref:`bool` **stereo** +----------+-------------------+ | *Setter* | set_stereo(value) | +----------+-------------------+ | *Getter* | is_stereo() | +----------+-------------------+ If ``true``, audio is stereo. Default value: ``false``. Method Descriptions ------------------- .. _class_AudioStreamSample_method_save_to_wav: - void **save_to_wav** **(** :ref:`String` path **)**