mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
138 lines
5.6 KiB
ReStructuredText
138 lines
5.6 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/AudioEffectRecord.xml.
|
|
|
|
.. _class_AudioEffectRecord:
|
|
|
|
AudioEffectRecord
|
|
=================
|
|
|
|
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Audio effect used for recording the sound from an audio bus.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
Allows the user to record the sound from an audio bus into an :ref:`AudioStreamWAV<class_AudioStreamWAV>`. When used on the "Master" audio bus, this includes all audio output by Godot.
|
|
|
|
Unlike :ref:`AudioEffectCapture<class_AudioEffectCapture>`, this effect encodes the recording with the given format (8-bit, 16-bit, or compressed) instead of giving access to the raw audio samples.
|
|
|
|
Can be used (with an :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`) to record from a microphone.
|
|
|
|
\ **Note:** :ref:`ProjectSettings.audio/driver/enable_input<class_ProjectSettings_property_audio/driver/enable_input>` must be ``true`` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`Recording with microphone <../tutorials/audio/recording_with_microphone>`
|
|
|
|
- `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------+--------------------------------------------------------+-------+
|
|
| :ref:`Format<enum_AudioStreamWAV_Format>` | :ref:`format<class_AudioEffectRecord_property_format>` | ``1`` |
|
|
+-------------------------------------------+--------------------------------------------------------+-------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Methods
|
|
-------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`get_recording<class_AudioEffectRecord_method_get_recording>`\ (\ ) |const| |
|
|
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_recording_active<class_AudioEffectRecord_method_is_recording_active>`\ (\ ) |const| |
|
|
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_recording_active<class_AudioEffectRecord_method_set_recording_active>`\ (\ record\: :ref:`bool<class_bool>`\ ) |
|
|
+---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_AudioEffectRecord_property_format:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Format<enum_AudioStreamWAV_Format>` **format** = ``1``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_format**\ (\ value\: :ref:`Format<enum_AudioStreamWAV_Format>`\ )
|
|
- :ref:`Format<enum_AudioStreamWAV_Format>` **get_format**\ (\ )
|
|
|
|
Specifies the format in which the sample will be recorded. See :ref:`Format<enum_AudioStreamWAV_Format>` for available formats.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_AudioEffectRecord_method_get_recording:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`AudioStreamWAV<class_AudioStreamWAV>` **get_recording**\ (\ ) |const|
|
|
|
|
Returns the recorded sample.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AudioEffectRecord_method_is_recording_active:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_recording_active**\ (\ ) |const|
|
|
|
|
Returns whether the recording is active or not.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AudioEffectRecord_method_set_recording_active:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_recording_active**\ (\ record\: :ref:`bool<class_bool>`\ )
|
|
|
|
If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
|
|
|
|
.. |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.)`
|