class_audiostream.rst 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AudioStream.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AudioStream:
  6. AudioStream
  7. ===========
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`, :ref:`AudioStreamMP3<class_AudioStreamMP3>`, :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`, :ref:`AudioStreamOGGVorbis<class_AudioStreamOGGVorbis>`, :ref:`AudioStreamRandomPitch<class_AudioStreamRandomPitch>`, :ref:`AudioStreamSample<class_AudioStreamSample>`
  10. Base class for audio streams.
  11. Description
  12. -----------
  13. 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.
  14. Tutorials
  15. ---------
  16. - :doc:`../tutorials/audio/audio_streams`
  17. - `Audio Generator Demo <https://godotengine.org/asset-library/asset/526>`__
  18. - `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
  19. - `Audio Spectrum Demo <https://godotengine.org/asset-library/asset/528>`__
  20. Methods
  21. -------
  22. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`_get_length<class_AudioStream_method__get_length>` **(** **)** |virtual| |const| |
  24. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+
  25. | :ref:`String<class_String>` | :ref:`_get_stream_name<class_AudioStream_method__get_stream_name>` **(** **)** |virtual| |const| |
  26. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+
  27. | :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`_instance_playback<class_AudioStream_method__instance_playback>` **(** **)** |virtual| |const| |
  28. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`_is_monophonic<class_AudioStream_method__is_monophonic>` **(** **)** |virtual| |const| |
  30. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+
  31. | :ref:`float<class_float>` | :ref:`get_length<class_AudioStream_method_get_length>` **(** **)** |const| |
  32. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`is_monophonic<class_AudioStream_method_is_monophonic>` **(** **)** |const| |
  34. +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+
  35. Method Descriptions
  36. -------------------
  37. .. _class_AudioStream_method__get_length:
  38. - :ref:`float<class_float>` **_get_length** **(** **)** |virtual| |const|
  39. ----
  40. .. _class_AudioStream_method__get_stream_name:
  41. - :ref:`String<class_String>` **_get_stream_name** **(** **)** |virtual| |const|
  42. ----
  43. .. _class_AudioStream_method__instance_playback:
  44. - :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **_instance_playback** **(** **)** |virtual| |const|
  45. ----
  46. .. _class_AudioStream_method__is_monophonic:
  47. - :ref:`bool<class_bool>` **_is_monophonic** **(** **)** |virtual| |const|
  48. ----
  49. .. _class_AudioStream_method_get_length:
  50. - :ref:`float<class_float>` **get_length** **(** **)** |const|
  51. Returns the length of the audio stream in seconds.
  52. ----
  53. .. _class_AudioStream_method_is_monophonic:
  54. - :ref:`bool<class_bool>` **is_monophonic** **(** **)** |const|
  55. Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
  56. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  57. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  58. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  59. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  60. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  61. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`