Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

classref: Sync with current master branch (8a6c1e8) #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/class_@gdscript.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Mark the following property as exported (editable in the Inspector dock and save
@export var image_array: Array[Image]
@export var node_array: Array[Node]

\ **Note:** Custom resources and nodes must be registered as global classes using ``class_name``.
\ **Note:** Custom resources and nodes should be registered as global classes using ``class_name``, since the Inspector currently only supports global classes. Otherwise, a less specific type will be exported instead.

\ **Note:** Node export is only supported in :ref:`Node<class_Node>`-derived classes and has a number of other limitations.

Expand Down
33 changes: 33 additions & 0 deletions classes/class_audiosample.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
: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/AudioSample.xml.

.. _class_AudioSample:

AudioSample
===========

**Experimental:** This class may be changed or removed in future versions.

**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`

Base class for audio samples.

.. rst-class:: classref-introduction-group

Description
-----------

Base class for audio samples.

.. |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.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
33 changes: 33 additions & 0 deletions classes/class_audiosampleplayback.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
: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/AudioSamplePlayback.xml.

.. _class_AudioSamplePlayback:

AudioSamplePlayback
===================

**Experimental:** This class may be changed or removed in future versions.

**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`

Meta class for playing back audio samples.

.. rst-class:: classref-introduction-group

Description
-----------

Meta class for playing back audio samples.

.. |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.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`
90 changes: 90 additions & 0 deletions classes/class_audioserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ Methods
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_bus_solo<class_AudioServer_method_is_bus_solo>`\ (\ bus_idx\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_stream_registered_as_sample<class_AudioServer_method_is_stream_registered_as_sample>`\ (\ stream\: :ref:`AudioStream<class_AudioStream>`\ ) |
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`lock<class_AudioServer_method_lock>`\ (\ ) |
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_bus<class_AudioServer_method_move_bus>`\ (\ index\: :ref:`int<class_int>`, to_index\: :ref:`int<class_int>`\ ) |
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`register_stream_as_sample<class_AudioServer_method_register_stream_as_sample>`\ (\ stream\: :ref:`AudioStream<class_AudioStream>`\ ) |
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_bus<class_AudioServer_method_remove_bus>`\ (\ index\: :ref:`int<class_int>`\ ) |
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_bus_effect<class_AudioServer_method_remove_bus_effect>`\ (\ bus_idx\: :ref:`int<class_int>`, effect_idx\: :ref:`int<class_int>`\ ) |
Expand Down Expand Up @@ -216,6 +220,60 @@ A 5.1 channel surround setup was detected.

A 7.1 channel surround setup was detected.

.. rst-class:: classref-item-separator

----

.. _enum_AudioServer_PlaybackType:

.. rst-class:: classref-enumeration

enum **PlaybackType**: :ref:`🔗<enum_AudioServer_PlaybackType>`

.. _class_AudioServer_constant_PLAYBACK_TYPE_DEFAULT:

.. rst-class:: classref-enumeration-constant

:ref:`PlaybackType<enum_AudioServer_PlaybackType>` **PLAYBACK_TYPE_DEFAULT** = ``0``

**Experimental:** This constant may be changed or removed in future versions.

The playback will be considered of the type declared at :ref:`ProjectSettings.audio/general/default_playback_type<class_ProjectSettings_property_audio/general/default_playback_type>`.

.. _class_AudioServer_constant_PLAYBACK_TYPE_STREAM:

.. rst-class:: classref-enumeration-constant

:ref:`PlaybackType<enum_AudioServer_PlaybackType>` **PLAYBACK_TYPE_STREAM** = ``1``

**Experimental:** This constant may be changed or removed in future versions.

Force the playback to be considered as a stream.

.. _class_AudioServer_constant_PLAYBACK_TYPE_SAMPLE:

.. rst-class:: classref-enumeration-constant

:ref:`PlaybackType<enum_AudioServer_PlaybackType>` **PLAYBACK_TYPE_SAMPLE** = ``2``

**Experimental:** This constant may be changed or removed in future versions.

Force the playback to be considered as a sample. This can provide lower latency and more stable playback (with less risk of audio crackling), at the cost of having less flexibility.

\ **Note:** Only currently supported on the web platform.

\ **Note:** :ref:`AudioEffect<class_AudioEffect>`\ s are not supported when playback is considered as a sample.

.. _class_AudioServer_constant_PLAYBACK_TYPE_MAX:

.. rst-class:: classref-enumeration-constant

:ref:`PlaybackType<enum_AudioServer_PlaybackType>` **PLAYBACK_TYPE_MAX** = ``3``

**Experimental:** This constant may be changed or removed in future versions.

Represents the size of the :ref:`PlaybackType<enum_AudioServer_PlaybackType>` enum.

.. rst-class:: classref-section-separator

----
Expand Down Expand Up @@ -592,6 +650,22 @@ If ``true``, the bus at index ``bus_idx`` is in solo mode.

----

.. _class_AudioServer_method_is_stream_registered_as_sample:

.. rst-class:: classref-method

:ref:`bool<class_bool>` **is_stream_registered_as_sample**\ (\ stream\: :ref:`AudioStream<class_AudioStream>`\ ) :ref:`🔗<class_AudioServer_method_is_stream_registered_as_sample>`

**Experimental:** This method may be changed or removed in future versions.

If ``true``, the stream is registered as a sample. The engine will not have to register it before playing the sample.

If ``false``, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with :ref:`register_stream_as_sample<class_AudioServer_method_register_stream_as_sample>`.

.. rst-class:: classref-item-separator

----

.. _class_AudioServer_method_lock:

.. rst-class:: classref-method
Expand All @@ -618,6 +692,22 @@ Moves the bus from index ``index`` to index ``to_index``.

----

.. _class_AudioServer_method_register_stream_as_sample:

.. rst-class:: classref-method

|void| **register_stream_as_sample**\ (\ stream\: :ref:`AudioStream<class_AudioStream>`\ ) :ref:`🔗<class_AudioServer_method_register_stream_as_sample>`

**Experimental:** This method may be changed or removed in future versions.

Forces the registration of a stream as a sample.

\ **Note:** Lag spikes may occur when calling this method, especially on single-threaded builds. It is suggested to call this method while loading assets, where the lag spike could be masked, instead of registering the sample right before it needs to be played.

.. rst-class:: classref-item-separator

----

.. _class_AudioServer_method_remove_bus:

.. rst-class:: classref-method
Expand Down
46 changes: 46 additions & 0 deletions classes/class_audiostream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ Methods
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_monophonic<class_AudioStream_private_method__is_monophonic>`\ (\ ) |virtual| |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`can_be_sampled<class_AudioStream_method_can_be_sampled>`\ (\ ) |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`AudioSample<class_AudioSample>` | :ref:`generate_sample<class_AudioStream_method_generate_sample>`\ (\ ) |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_meta_stream<class_AudioStream_method_is_meta_stream>`\ (\ ) |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_monophonic<class_AudioStream_method_is_monophonic>`\ (\ ) |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+

Expand Down Expand Up @@ -180,6 +186,34 @@ Override this method to customize the returned value of :ref:`is_monophonic<clas

----

.. _class_AudioStream_method_can_be_sampled:

.. rst-class:: classref-method

:ref:`bool<class_bool>` **can_be_sampled**\ (\ ) |const| :ref:`🔗<class_AudioStream_method_can_be_sampled>`

**Experimental:** This method may be changed or removed in future versions.

Returns if the current **AudioStream** can be used as a sample. Only static streams can be sampled.

.. rst-class:: classref-item-separator

----

.. _class_AudioStream_method_generate_sample:

.. rst-class:: classref-method

:ref:`AudioSample<class_AudioSample>` **generate_sample**\ (\ ) |const| :ref:`🔗<class_AudioStream_method_generate_sample>`

**Experimental:** This method may be changed or removed in future versions.

Generates an :ref:`AudioSample<class_AudioSample>` based on the current stream.

.. rst-class:: classref-item-separator

----

.. _class_AudioStream_method_get_length:

.. rst-class:: classref-method
Expand All @@ -204,6 +238,18 @@ Returns a newly created :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` in

----

.. _class_AudioStream_method_is_meta_stream:

.. rst-class:: classref-method

:ref:`bool<class_bool>` **is_meta_stream**\ (\ ) |const| :ref:`🔗<class_AudioStream_method_is_meta_stream>`

Returns ``true`` if the stream is a collection of other streams, ``false`` otherwise.

.. rst-class:: classref-item-separator

----

.. _class_AudioStream_method_is_monophonic:

.. rst-class:: classref-method
Expand Down
Loading