class_audioeffectrecord.rst 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.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 sound from a microphone.
  10. Description
  11. -----------
  12. Allows the user to record sound from a microphone. 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.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/audio/recording_with_microphone`
  16. Properties
  17. ----------
  18. +----------------------------------------------+--------------------------------------------------------+-------+
  19. | :ref:`Format<enum_AudioStreamSample_Format>` | :ref:`format<class_AudioEffectRecord_property_format>` | ``1`` |
  20. +----------------------------------------------+--------------------------------------------------------+-------+
  21. Methods
  22. -------
  23. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`AudioStreamSample<class_AudioStreamSample>` | :ref:`get_recording<class_AudioEffectRecord_method_get_recording>` **(** **)** |const| |
  25. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`is_recording_active<class_AudioEffectRecord_method_is_recording_active>` **(** **)** |const| |
  27. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`set_recording_active<class_AudioEffectRecord_method_set_recording_active>` **(** :ref:`bool<class_bool>` record **)** |
  29. +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  30. Property Descriptions
  31. ---------------------
  32. .. _class_AudioEffectRecord_property_format:
  33. - :ref:`Format<enum_AudioStreamSample_Format>` **format**
  34. +-----------+-------------------+
  35. | *Default* | ``1`` |
  36. +-----------+-------------------+
  37. | *Setter* | set_format(value) |
  38. +-----------+-------------------+
  39. | *Getter* | get_format() |
  40. +-----------+-------------------+
  41. Specifies the format in which the sample will be recorded. See :ref:`Format<enum_AudioStreamSample_Format>` for available formats.
  42. Method Descriptions
  43. -------------------
  44. .. _class_AudioEffectRecord_method_get_recording:
  45. - :ref:`AudioStreamSample<class_AudioStreamSample>` **get_recording** **(** **)** |const|
  46. Returns the recorded sample.
  47. ----
  48. .. _class_AudioEffectRecord_method_is_recording_active:
  49. - :ref:`bool<class_bool>` **is_recording_active** **(** **)** |const|
  50. Returns whether the recording is active or not.
  51. ----
  52. .. _class_AudioEffectRecord_method_set_recording_active:
  53. - void **set_recording_active** **(** :ref:`bool<class_bool>` record **)**
  54. If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
  55. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  56. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  57. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`