class_audioeffectrecord.rst 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AudioEffectRecord.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AudioEffectRecord:
  6. AudioEffectRecord
  7. =================
  8. **Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Audio effect used for recording the sound from an audio bus.
  10. Description
  11. -----------
  12. Allows the user to record the sound from an audio bus. This can include all audio output by Godot when used on the "Master" audio bus.
  13. Can be used (with an :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`) to record from a microphone.
  14. It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample.
  15. Tutorials
  16. ---------
  17. - :doc:`../tutorials/audio/recording_with_microphone`
  18. - `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
  19. Properties
  20. ----------
  21. +----------------------------------------------+--------------------------------------------------------+-------+
  22. | :ref:`Format<enum_AudioStreamSample_Format>` | :ref:`format<class_AudioEffectRecord_property_format>` | ``1`` |
  23. +----------------------------------------------+--------------------------------------------------------+-------+
  24. Methods
  25. -------
  26. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`AudioStreamSample<class_AudioStreamSample>` | :ref:`get_recording<class_AudioEffectRecord_method_get_recording>` **(** **)** |const| |
  28. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`is_recording_active<class_AudioEffectRecord_method_is_recording_active>` **(** **)** |const| |
  30. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_recording_active<class_AudioEffectRecord_method_set_recording_active>` **(** :ref:`bool<class_bool>` record **)** |
  32. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  33. Property Descriptions
  34. ---------------------
  35. .. _class_AudioEffectRecord_property_format:
  36. - :ref:`Format<enum_AudioStreamSample_Format>` **format**
  37. +-----------+-------------------+
  38. | *Default* | ``1`` |
  39. +-----------+-------------------+
  40. | *Setter* | set_format(value) |
  41. +-----------+-------------------+
  42. | *Getter* | get_format() |
  43. +-----------+-------------------+
  44. Specifies the format in which the sample will be recorded. See :ref:`Format<enum_AudioStreamSample_Format>` for available formats.
  45. Method Descriptions
  46. -------------------
  47. .. _class_AudioEffectRecord_method_get_recording:
  48. - :ref:`AudioStreamSample<class_AudioStreamSample>` **get_recording** **(** **)** |const|
  49. Returns the recorded sample.
  50. ----
  51. .. _class_AudioEffectRecord_method_is_recording_active:
  52. - :ref:`bool<class_bool>` **is_recording_active** **(** **)** |const|
  53. Returns whether the recording is active or not.
  54. ----
  55. .. _class_AudioEffectRecord_method_set_recording_active:
  56. - void **set_recording_active** **(** :ref:`bool<class_bool>` record **)**
  57. If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
  58. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  59. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  60. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`