class_audiostream.rst 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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/doc/classes/AudioStream.xml.
  6. .. _class_AudioStream:
  7. AudioStream
  8. ===========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`, :ref:`AudioStreamMP3<class_AudioStreamMP3>`, :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`, :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`, :ref:`AudioStreamRandomizer<class_AudioStreamRandomizer>`, :ref:`AudioStreamWAV<class_AudioStreamWAV>`
  11. Base class for audio streams.
  12. Description
  13. -----------
  14. Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via :ref:`AudioStreamWAV<class_AudioStreamWAV>`) and Ogg (via :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`) file formats.
  15. Tutorials
  16. ---------
  17. - :doc:`Audio streams <../tutorials/audio/audio_streams>`
  18. - `Audio Generator Demo <https://godotengine.org/asset-library/asset/526>`__
  19. - `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
  20. - `Audio Spectrum Demo <https://godotengine.org/asset-library/asset/528>`__
  21. Methods
  22. -------
  23. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  24. | :ref:`int<class_int>` | :ref:`_get_beat_count<class_AudioStream_method__get_beat_count>` **(** **)** |virtual| |const| |
  25. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`_get_bpm<class_AudioStream_method__get_bpm>` **(** **)** |virtual| |const| |
  27. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | :ref:`_get_length<class_AudioStream_method__get_length>` **(** **)** |virtual| |const| |
  29. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  30. | :ref:`String<class_String>` | :ref:`_get_stream_name<class_AudioStream_method__get_stream_name>` **(** **)** |virtual| |const| |
  31. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  32. | :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`_instantiate_playback<class_AudioStream_method__instantiate_playback>` **(** **)** |virtual| |const| |
  33. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`_is_monophonic<class_AudioStream_method__is_monophonic>` **(** **)** |virtual| |const| |
  35. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  36. | :ref:`float<class_float>` | :ref:`get_length<class_AudioStream_method_get_length>` **(** **)** |const| |
  37. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  38. | :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`instantiate_playback<class_AudioStream_method_instantiate_playback>` **(** **)** |
  39. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`is_monophonic<class_AudioStream_method_is_monophonic>` **(** **)** |const| |
  41. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
  42. Method Descriptions
  43. -------------------
  44. .. _class_AudioStream_method__get_beat_count:
  45. - :ref:`int<class_int>` **_get_beat_count** **(** **)** |virtual| |const|
  46. .. container:: contribute
  47. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  48. ----
  49. .. _class_AudioStream_method__get_bpm:
  50. - :ref:`float<class_float>` **_get_bpm** **(** **)** |virtual| |const|
  51. .. container:: contribute
  52. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  53. ----
  54. .. _class_AudioStream_method__get_length:
  55. - :ref:`float<class_float>` **_get_length** **(** **)** |virtual| |const|
  56. .. container:: contribute
  57. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  58. ----
  59. .. _class_AudioStream_method__get_stream_name:
  60. - :ref:`String<class_String>` **_get_stream_name** **(** **)** |virtual| |const|
  61. .. container:: contribute
  62. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  63. ----
  64. .. _class_AudioStream_method__instantiate_playback:
  65. - :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **_instantiate_playback** **(** **)** |virtual| |const|
  66. .. container:: contribute
  67. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  68. ----
  69. .. _class_AudioStream_method__is_monophonic:
  70. - :ref:`bool<class_bool>` **_is_monophonic** **(** **)** |virtual| |const|
  71. .. container:: contribute
  72. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  73. ----
  74. .. _class_AudioStream_method_get_length:
  75. - :ref:`float<class_float>` **get_length** **(** **)** |const|
  76. Returns the length of the audio stream in seconds.
  77. ----
  78. .. _class_AudioStream_method_instantiate_playback:
  79. - :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **instantiate_playback** **(** **)**
  80. Returns an AudioStreamPlayback. Useful for when you want to extend :ref:`_instantiate_playback<class_AudioStream_method__instantiate_playback>` but call :ref:`instantiate_playback<class_AudioStream_method_instantiate_playback>` from an internally held AudioStream subresource. An example of this can be found in the source files for ``AudioStreamRandomPitch::instantiate_playback``.
  81. ----
  82. .. _class_AudioStream_method_is_monophonic:
  83. - :ref:`bool<class_bool>` **is_monophonic** **(** **)** |const|
  84. Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
  85. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  86. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  87. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  88. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  89. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  90. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`