class_audiostream.rst 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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:`AudioStreamSample<class_AudioStreamSample>`
  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:`AudioStreamSample<class_AudioStreamSample>`) 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. ----
  47. .. _class_AudioStream_method__get_bpm:
  48. - :ref:`float<class_float>` **_get_bpm** **(** **)** |virtual| |const|
  49. ----
  50. .. _class_AudioStream_method__get_length:
  51. - :ref:`float<class_float>` **_get_length** **(** **)** |virtual| |const|
  52. ----
  53. .. _class_AudioStream_method__get_stream_name:
  54. - :ref:`String<class_String>` **_get_stream_name** **(** **)** |virtual| |const|
  55. ----
  56. .. _class_AudioStream_method__instantiate_playback:
  57. - :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **_instantiate_playback** **(** **)** |virtual| |const|
  58. ----
  59. .. _class_AudioStream_method__is_monophonic:
  60. - :ref:`bool<class_bool>` **_is_monophonic** **(** **)** |virtual| |const|
  61. ----
  62. .. _class_AudioStream_method_get_length:
  63. - :ref:`float<class_float>` **get_length** **(** **)** |const|
  64. Returns the length of the audio stream in seconds.
  65. ----
  66. .. _class_AudioStream_method_instantiate_playback:
  67. - :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **instantiate_playback** **(** **)**
  68. 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``.
  69. ----
  70. .. _class_AudioStream_method_is_monophonic:
  71. - :ref:`bool<class_bool>` **is_monophonic** **(** **)** |const|
  72. Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
  73. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  74. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  75. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  76. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  77. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  78. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`