class_audioeffectrecord.rst 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioEffectRecord.xml.
  6. .. _class_AudioEffectRecord:
  7. AudioEffectRecord
  8. =================
  9. **Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Audio effect used for recording the sound from an audio bus.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. 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.
  16. Can be used (with an :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`) to record from a microphone.
  17. \ **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.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - :doc:`Recording with microphone <../tutorials/audio/recording_with_microphone>`
  22. - `Audio Microphone Record Demo <https://godotengine.org/asset-library/asset/2760>`__
  23. .. rst-class:: classref-reftable-group
  24. Properties
  25. ----------
  26. .. table::
  27. :widths: auto
  28. +-------------------------------------------+--------------------------------------------------------+-------+
  29. | :ref:`Format<enum_AudioStreamWAV_Format>` | :ref:`format<class_AudioEffectRecord_property_format>` | ``1`` |
  30. +-------------------------------------------+--------------------------------------------------------+-------+
  31. .. rst-class:: classref-reftable-group
  32. Methods
  33. -------
  34. .. table::
  35. :widths: auto
  36. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`AudioStreamWAV<class_AudioStreamWAV>` | :ref:`get_recording<class_AudioEffectRecord_method_get_recording>`\ (\ ) |const| |
  38. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`is_recording_active<class_AudioEffectRecord_method_is_recording_active>`\ (\ ) |const| |
  40. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  41. | |void| | :ref:`set_recording_active<class_AudioEffectRecord_method_set_recording_active>`\ (\ record\: :ref:`bool<class_bool>`\ ) |
  42. +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Property Descriptions
  47. ---------------------
  48. .. _class_AudioEffectRecord_property_format:
  49. .. rst-class:: classref-property
  50. :ref:`Format<enum_AudioStreamWAV_Format>` **format** = ``1`` :ref:`🔗<class_AudioEffectRecord_property_format>`
  51. .. rst-class:: classref-property-setget
  52. - |void| **set_format**\ (\ value\: :ref:`Format<enum_AudioStreamWAV_Format>`\ )
  53. - :ref:`Format<enum_AudioStreamWAV_Format>` **get_format**\ (\ )
  54. Specifies the format in which the sample will be recorded. See :ref:`Format<enum_AudioStreamWAV_Format>` for available formats.
  55. .. rst-class:: classref-section-separator
  56. ----
  57. .. rst-class:: classref-descriptions-group
  58. Method Descriptions
  59. -------------------
  60. .. _class_AudioEffectRecord_method_get_recording:
  61. .. rst-class:: classref-method
  62. :ref:`AudioStreamWAV<class_AudioStreamWAV>` **get_recording**\ (\ ) |const| :ref:`🔗<class_AudioEffectRecord_method_get_recording>`
  63. Returns the recorded sample.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_AudioEffectRecord_method_is_recording_active:
  67. .. rst-class:: classref-method
  68. :ref:`bool<class_bool>` **is_recording_active**\ (\ ) |const| :ref:`🔗<class_AudioEffectRecord_method_is_recording_active>`
  69. Returns whether the recording is active or not.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_AudioEffectRecord_method_set_recording_active:
  73. .. rst-class:: classref-method
  74. |void| **set_recording_active**\ (\ record\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_AudioEffectRecord_method_set_recording_active>`
  75. If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
  76. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  77. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  78. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  79. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  80. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  81. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  82. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  83. .. |void| replace:: :abbr:`void (No return value.)`