class_audiostream.rst 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/AudioStream.xml.
  6. .. _class_AudioStream:
  7. AudioStream
  8. ===========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`, :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`, :ref:`AudioStreamMP3<class_AudioStreamMP3>`, :ref:`AudioStreamOGGVorbis<class_AudioStreamOGGVorbis>`, :ref:`AudioStreamRandomPitch<class_AudioStreamRandomPitch>`, :ref:`AudioStreamSample<class_AudioStreamSample>`
  11. Base class for audio streams.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. 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.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Audio streams <../tutorials/audio/audio_streams>`
  20. - `Audio Generator Demo <https://godotengine.org/asset-library/asset/526>`__
  21. - `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
  22. - `Audio Spectrum Demo <https://godotengine.org/asset-library/asset/528>`__
  23. .. rst-class:: classref-reftable-group
  24. Methods
  25. -------
  26. .. table::
  27. :widths: auto
  28. +---------------------------+----------------------------------------------------------------------------+
  29. | :ref:`float<class_float>` | :ref:`get_length<class_AudioStream_method_get_length>` **(** **)** |const| |
  30. +---------------------------+----------------------------------------------------------------------------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Method Descriptions
  35. -------------------
  36. .. _class_AudioStream_method_get_length:
  37. .. rst-class:: classref-method
  38. :ref:`float<class_float>` **get_length** **(** **)** |const|
  39. Returns the length of the audio stream in seconds.
  40. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  41. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  42. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  43. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`