class_audiostreamoggvorbis.rst 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml.
  6. .. _class_AudioStreamOggVorbis:
  7. AudioStreamOggVorbis
  8. ====================
  9. **Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A class representing an Ogg Vorbis audio stream.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. The AudioStreamOggVorbis class is a specialized :ref:`AudioStream<class_AudioStream>` for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the :ref:`AudioStreamWAV<class_AudioStreamWAV>` class.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  21. | :ref:`int<class_int>` | :ref:`bar_beats<class_AudioStreamOggVorbis_property_bar_beats>` | ``4`` |
  22. +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  23. | :ref:`int<class_int>` | :ref:`beat_count<class_AudioStreamOggVorbis_property_beat_count>` | ``0`` |
  24. +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  25. | :ref:`float<class_float>` | :ref:`bpm<class_AudioStreamOggVorbis_property_bpm>` | ``0.0`` |
  26. +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  27. | :ref:`bool<class_bool>` | :ref:`loop<class_AudioStreamOggVorbis_property_loop>` | ``false`` |
  28. +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  29. | :ref:`float<class_float>` | :ref:`loop_offset<class_AudioStreamOggVorbis_property_loop_offset>` | ``0.0`` |
  30. +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  31. | :ref:`OggPacketSequence<class_OggPacketSequence>` | :ref:`packet_sequence<class_AudioStreamOggVorbis_property_packet_sequence>` | |
  32. +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  33. .. rst-class:: classref-reftable-group
  34. Methods
  35. -------
  36. .. table::
  37. :widths: auto
  38. +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_buffer<class_AudioStreamOggVorbis_method_load_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |static| |
  40. +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_file<class_AudioStreamOggVorbis_method_load_from_file>` **(** :ref:`String<class_String>` path **)** |static| |
  42. +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Property Descriptions
  47. ---------------------
  48. .. _class_AudioStreamOggVorbis_property_bar_beats:
  49. .. rst-class:: classref-property
  50. :ref:`int<class_int>` **bar_beats** = ``4``
  51. .. rst-class:: classref-property-setget
  52. - void **set_bar_beats** **(** :ref:`int<class_int>` value **)**
  53. - :ref:`int<class_int>` **get_bar_beats** **(** **)**
  54. .. container:: contribute
  55. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_AudioStreamOggVorbis_property_beat_count:
  59. .. rst-class:: classref-property
  60. :ref:`int<class_int>` **beat_count** = ``0``
  61. .. rst-class:: classref-property-setget
  62. - void **set_beat_count** **(** :ref:`int<class_int>` value **)**
  63. - :ref:`int<class_int>` **get_beat_count** **(** **)**
  64. .. container:: contribute
  65. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  66. .. rst-class:: classref-item-separator
  67. ----
  68. .. _class_AudioStreamOggVorbis_property_bpm:
  69. .. rst-class:: classref-property
  70. :ref:`float<class_float>` **bpm** = ``0.0``
  71. .. rst-class:: classref-property-setget
  72. - void **set_bpm** **(** :ref:`float<class_float>` value **)**
  73. - :ref:`float<class_float>` **get_bpm** **(** **)**
  74. .. container:: contribute
  75. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  76. .. rst-class:: classref-item-separator
  77. ----
  78. .. _class_AudioStreamOggVorbis_property_loop:
  79. .. rst-class:: classref-property
  80. :ref:`bool<class_bool>` **loop** = ``false``
  81. .. rst-class:: classref-property-setget
  82. - void **set_loop** **(** :ref:`bool<class_bool>` value **)**
  83. - :ref:`bool<class_bool>` **has_loop** **(** **)**
  84. If ``true``, the audio will play again from the specified :ref:`loop_offset<class_AudioStreamOggVorbis_property_loop_offset>` once it is done playing. Useful for ambient sounds and background music.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_AudioStreamOggVorbis_property_loop_offset:
  88. .. rst-class:: classref-property
  89. :ref:`float<class_float>` **loop_offset** = ``0.0``
  90. .. rst-class:: classref-property-setget
  91. - void **set_loop_offset** **(** :ref:`float<class_float>` value **)**
  92. - :ref:`float<class_float>` **get_loop_offset** **(** **)**
  93. Time in seconds at which the stream starts after being looped.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_AudioStreamOggVorbis_property_packet_sequence:
  97. .. rst-class:: classref-property
  98. :ref:`OggPacketSequence<class_OggPacketSequence>` **packet_sequence**
  99. .. rst-class:: classref-property-setget
  100. - void **set_packet_sequence** **(** :ref:`OggPacketSequence<class_OggPacketSequence>` value **)**
  101. - :ref:`OggPacketSequence<class_OggPacketSequence>` **get_packet_sequence** **(** **)**
  102. Contains the raw Ogg data for this stream.
  103. .. rst-class:: classref-section-separator
  104. ----
  105. .. rst-class:: classref-descriptions-group
  106. Method Descriptions
  107. -------------------
  108. .. _class_AudioStreamOggVorbis_method_load_from_buffer:
  109. .. rst-class:: classref-method
  110. :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |static|
  111. Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _class_AudioStreamOggVorbis_method_load_from_file:
  115. .. rst-class:: classref-method
  116. :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_file** **(** :ref:`String<class_String>` path **)** |static|
  117. Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format.
  118. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  119. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  120. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  121. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  122. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  123. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  124. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`