mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
149 lines
7.8 KiB
ReStructuredText
149 lines
7.8 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioStream.xml.
|
|
|
|
.. _class_AudioStream:
|
|
|
|
AudioStream
|
|
===========
|
|
|
|
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
**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>`
|
|
|
|
Base class for audio streams.
|
|
|
|
Description
|
|
-----------
|
|
|
|
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.
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`Audio streams <../tutorials/audio/audio_streams>`
|
|
|
|
- `Audio Generator Demo <https://godotengine.org/asset-library/asset/526>`__
|
|
|
|
- `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
|
|
|
|
- `Audio Spectrum Demo <https://godotengine.org/asset-library/asset/528>`__
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`_get_beat_count<class_AudioStream_method__get_beat_count>` **(** **)** |virtual| |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`_get_bpm<class_AudioStream_method__get_bpm>` **(** **)** |virtual| |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`_get_length<class_AudioStream_method__get_length>` **(** **)** |virtual| |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`_get_stream_name<class_AudioStream_method__get_stream_name>` **(** **)** |virtual| |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`_instantiate_playback<class_AudioStream_method__instantiate_playback>` **(** **)** |virtual| |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`_is_monophonic<class_AudioStream_method__is_monophonic>` **(** **)** |virtual| |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_length<class_AudioStream_method_get_length>` **(** **)** |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`instantiate_playback<class_AudioStream_method_instantiate_playback>` **(** **)** |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_monophonic<class_AudioStream_method_is_monophonic>` **(** **)** |const| |
|
|
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_AudioStream_method__get_beat_count:
|
|
|
|
- :ref:`int<class_int>` **_get_beat_count** **(** **)** |virtual| |const|
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method__get_bpm:
|
|
|
|
- :ref:`float<class_float>` **_get_bpm** **(** **)** |virtual| |const|
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method__get_length:
|
|
|
|
- :ref:`float<class_float>` **_get_length** **(** **)** |virtual| |const|
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method__get_stream_name:
|
|
|
|
- :ref:`String<class_String>` **_get_stream_name** **(** **)** |virtual| |const|
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method__instantiate_playback:
|
|
|
|
- :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **_instantiate_playback** **(** **)** |virtual| |const|
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method__is_monophonic:
|
|
|
|
- :ref:`bool<class_bool>` **_is_monophonic** **(** **)** |virtual| |const|
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method_get_length:
|
|
|
|
- :ref:`float<class_float>` **get_length** **(** **)** |const|
|
|
|
|
Returns the length of the audio stream in seconds.
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method_instantiate_playback:
|
|
|
|
- :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **instantiate_playback** **(** **)**
|
|
|
|
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``.
|
|
|
|
----
|
|
|
|
.. _class_AudioStream_method_is_monophonic:
|
|
|
|
- :ref:`bool<class_bool>` **is_monophonic** **(** **)** |const|
|
|
|
|
Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
|
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
|
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|