class_audiostreamsample.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the AudioStreamSample.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_AudioStreamSample:
  5. AudioStreamSample
  6. =================
  7. **Inherits:** :ref:`AudioStream<class_audiostream>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Plays audio.
  12. Member Functions
  13. ----------------
  14. +--------------------------------------------+--------------------------------------------------------------------------------------------------------------+
  15. | :ref:`PoolByteArray<class_poolbytearray>` | :ref:`get_data<class_AudioStreamSample_get_data>` **(** **)** const |
  16. +--------------------------------------------+--------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`set_data<class_AudioStreamSample_set_data>` **(** :ref:`PoolByteArray<class_poolbytearray>` data **)** |
  18. +--------------------------------------------+--------------------------------------------------------------------------------------------------------------+
  19. Member Variables
  20. ----------------
  21. .. _class_AudioStreamSample_format:
  22. - :ref:`int<class_int>` **format** - Audio format. See FORMAT\_\* constants for values.
  23. .. _class_AudioStreamSample_loop_begin:
  24. - :ref:`int<class_int>` **loop_begin** - Loop start in bytes.
  25. .. _class_AudioStreamSample_loop_end:
  26. - :ref:`int<class_int>` **loop_end** - Loop end in bytes.
  27. .. _class_AudioStreamSample_loop_mode:
  28. - :ref:`int<class_int>` **loop_mode** - Loop mode. See LOOP\_\* constants for values.
  29. .. _class_AudioStreamSample_mix_rate:
  30. - :ref:`int<class_int>` **mix_rate** - The sample rate for mixing this audio.
  31. .. _class_AudioStreamSample_stereo:
  32. - :ref:`bool<class_bool>` **stereo** - If ``true``, audio is stereo. Default value: ``false``.
  33. Numeric Constants
  34. -----------------
  35. - **FORMAT_8_BITS** = **0** --- Audio codec 8 bit.
  36. - **FORMAT_16_BITS** = **1** --- Audio codec 16 bit.
  37. - **FORMAT_IMA_ADPCM** = **2** --- Audio codec IMA ADPCM.
  38. - **LOOP_DISABLED** = **0** --- Audio does not loop.
  39. - **LOOP_FORWARD** = **1** --- Audio loops the data between loop_begin and loop_end playing forward only.
  40. - **LOOP_PING_PONG** = **2** --- Audio loops the data between loop_begin and loop_end playing back and forth.
  41. Description
  42. -----------
  43. Plays audio, can loop.
  44. Member Function Description
  45. ---------------------------
  46. .. _class_AudioStreamSample_get_data:
  47. - :ref:`PoolByteArray<class_poolbytearray>` **get_data** **(** **)** const
  48. .. _class_AudioStreamSample_set_data:
  49. - void **set_data** **(** :ref:`PoolByteArray<class_poolbytearray>` data **)**