classref: Sync with current 3.x branch (995c24415)

This commit is contained in:
Yuri Sizov
2023-04-13 18:01:11 +02:00
parent f15871e2b2
commit 99c2ec8fb3
709 changed files with 116000 additions and 57747 deletions

View File

@@ -14,6 +14,8 @@ AudioStreamGenerator
Audio stream that generates sounds procedurally.
.. rst-class:: classref-introduction-group
Description
-----------
@@ -23,6 +25,8 @@ See also :ref:`AudioEffectSpectrumAnalyzer<class_AudioEffectSpectrumAnalyzer>` f
\ **Note:** Due to performance constraints, this class is best used from C# or from a compiled language via GDNative. If you still want to use this class from GDScript, consider using a lower :ref:`mix_rate<class_AudioStreamGenerator_property_mix_rate>` such as 11,025 Hz or 22,050 Hz.
.. rst-class:: classref-introduction-group
Tutorials
---------
@@ -30,45 +34,56 @@ Tutorials
- `Godot 3.2 will get new audio features <https://godotengine.org/article/godot-32-will-get-new-audio-features>`__
.. rst-class:: classref-reftable-group
Properties
----------
+---------------------------+-------------------------------------------------------------------------+-------------+
| :ref:`float<class_float>` | :ref:`buffer_length<class_AudioStreamGenerator_property_buffer_length>` | ``0.5`` |
+---------------------------+-------------------------------------------------------------------------+-------------+
| :ref:`float<class_float>` | :ref:`mix_rate<class_AudioStreamGenerator_property_mix_rate>` | ``44100.0`` |
+---------------------------+-------------------------------------------------------------------------+-------------+
.. table::
:widths: auto
+---------------------------+-------------------------------------------------------------------------+-------------+
| :ref:`float<class_float>` | :ref:`buffer_length<class_AudioStreamGenerator_property_buffer_length>` | ``0.5`` |
+---------------------------+-------------------------------------------------------------------------+-------------+
| :ref:`float<class_float>` | :ref:`mix_rate<class_AudioStreamGenerator_property_mix_rate>` | ``44100.0`` |
+---------------------------+-------------------------------------------------------------------------+-------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_AudioStreamGenerator_property_buffer_length:
- :ref:`float<class_float>` **buffer_length**
.. rst-class:: classref-property
+-----------+--------------------------+
| *Default* | ``0.5`` |
+-----------+--------------------------+
| *Setter* | set_buffer_length(value) |
+-----------+--------------------------+
| *Getter* | get_buffer_length() |
+-----------+--------------------------+
:ref:`float<class_float>` **buffer_length** = ``0.5``
.. rst-class:: classref-property-setget
- void **set_buffer_length** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_buffer_length** **(** **)**
The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up.
.. rst-class:: classref-item-separator
----
.. _class_AudioStreamGenerator_property_mix_rate:
- :ref:`float<class_float>` **mix_rate**
.. rst-class:: classref-property
+-----------+---------------------+
| *Default* | ``44100.0`` |
+-----------+---------------------+
| *Setter* | set_mix_rate(value) |
+-----------+---------------------+
| *Getter* | get_mix_rate() |
+-----------+---------------------+
:ref:`float<class_float>` **mix_rate** = ``44100.0``
.. rst-class:: classref-property-setget
- void **set_mix_rate** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_mix_rate** **(** **)**
The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality.
@@ -79,3 +94,4 @@ According to the `Nyquist-Shannon sampling theorem <https://en.wikipedia.org/wik
.. |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.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`