class_audiostream.rst 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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:`Reference<class_Reference>` **<** :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>` **(** **)** |const| |
  24. +---------------------------+----------------------------------------------------------------------------+
  25. Method Descriptions
  26. -------------------
  27. .. _class_AudioStream_method_get_length:
  28. - :ref:`float<class_float>` **get_length** **(** **)** |const|
  29. Returns the length of the audio stream in seconds.
  30. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  31. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  32. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`