mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
Currently including `zh_CN` and `es` which both have very high completion ratios. Others will be added once they reach a significant percentage too. These RST files will be used by godot-docs in place of its `classes` folder after we sync with https://github.com/godotengine/godot-docs/pull/5458. The update workflow is manual for now (example for `zh_CN`): - Build `godotengine/godot` in the branch we currently track (now `3.x`) - Run `godot --doctool -l zh_CN` - Run `cd doc && make rst LANGARG=zh_CN` - Copy `doc/_build/rst/*` to `classes/zh_CN/` here - Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
95 lines
5.6 KiB
ReStructuredText
95 lines
5.6 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the AudioStreamGeneratorPlayback.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_AudioStreamGeneratorPlayback:
|
|
|
|
AudioStreamGeneratorPlayback
|
|
============================
|
|
|
|
**Inherits:** :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>` **<** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Plays back audio generated using :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`.
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
This class is meant to be used with :ref:`AudioStreamGenerator<class_AudioStreamGenerator>` to play back the generated audio in real-time.
|
|
|
|
Tutoriales
|
|
--------------------
|
|
|
|
- `Audio Generator Demo <https://godotengine.org/asset-library/asset/526>`__
|
|
|
|
- `https://godotengine.org/article/godot-32-will-get-new-audio-features <Godot 3.2 will get new audio features>`__
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`can_push_buffer<class_AudioStreamGeneratorPlayback_method_can_push_buffer>` **(** :ref:`int<class_int>` amount **)** |const| |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`clear_buffer<class_AudioStreamGeneratorPlayback_method_clear_buffer>` **(** **)** |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_frames_available<class_AudioStreamGeneratorPlayback_method_get_frames_available>` **(** **)** |const| |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_skips<class_AudioStreamGeneratorPlayback_method_get_skips>` **(** **)** |const| |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`push_buffer<class_AudioStreamGeneratorPlayback_method_push_buffer>` **(** :ref:`PoolVector2Array<class_PoolVector2Array>` frames **)** |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`push_frame<class_AudioStreamGeneratorPlayback_method_push_frame>` **(** :ref:`Vector2<class_Vector2>` frame **)** |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_AudioStreamGeneratorPlayback_method_can_push_buffer:
|
|
|
|
- :ref:`bool<class_bool>` **can_push_buffer** **(** :ref:`int<class_int>` amount **)** |const|
|
|
|
|
Returns ``true`` if a buffer of the size ``amount`` can be pushed to the audio sample data buffer without overflowing it, ``false`` otherwise.
|
|
|
|
----
|
|
|
|
.. _class_AudioStreamGeneratorPlayback_method_clear_buffer:
|
|
|
|
- void **clear_buffer** **(** **)**
|
|
|
|
Clears the audio sample data buffer.
|
|
|
|
----
|
|
|
|
.. _class_AudioStreamGeneratorPlayback_method_get_frames_available:
|
|
|
|
- :ref:`int<class_int>` **get_frames_available** **(** **)** |const|
|
|
|
|
Returns the number of audio data frames left to play. If this returned number reaches ``0``, the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking.
|
|
|
|
----
|
|
|
|
.. _class_AudioStreamGeneratorPlayback_method_get_skips:
|
|
|
|
- :ref:`int<class_int>` **get_skips** **(** **)** |const|
|
|
|
|
----
|
|
|
|
.. _class_AudioStreamGeneratorPlayback_method_push_buffer:
|
|
|
|
- :ref:`bool<class_bool>` **push_buffer** **(** :ref:`PoolVector2Array<class_PoolVector2Array>` frames **)**
|
|
|
|
Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame<class_AudioStreamGeneratorPlayback_method_push_frame>` in C# and compiled languages via GDNative, but :ref:`push_buffer<class_AudioStreamGeneratorPlayback_method_push_buffer>` may be *less* efficient in GDScript.
|
|
|
|
----
|
|
|
|
.. _class_AudioStreamGeneratorPlayback_method_push_frame:
|
|
|
|
- :ref:`bool<class_bool>` **push_frame** **(** :ref:`Vector2<class_Vector2>` frame **)**
|
|
|
|
Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer<class_AudioStreamGeneratorPlayback_method_push_buffer>` in C# and compiled languages via GDNative, but :ref:`push_frame<class_AudioStreamGeneratorPlayback_method_push_frame>` may be *more* efficient in GDScript.
|
|
|
|
.. |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.)`
|