AudioEffectRecord.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AudioEffectRecord" inherits="AudioEffect" version="3.4">
  3. <brief_description>
  4. Audio effect used for recording sound from a microphone.
  5. </brief_description>
  6. <description>
  7. 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.
  8. </description>
  9. <tutorials>
  10. <link title="Recording with microphone">https://docs.godotengine.org/en/3.3/tutorials/audio/recording_with_microphone.html</link>
  11. <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
  12. </tutorials>
  13. <methods>
  14. <method name="get_recording" qualifiers="const">
  15. <return type="AudioStreamSample">
  16. </return>
  17. <description>
  18. Returns the recorded sample.
  19. </description>
  20. </method>
  21. <method name="is_recording_active" qualifiers="const">
  22. <return type="bool">
  23. </return>
  24. <description>
  25. Returns whether the recording is active or not.
  26. </description>
  27. </method>
  28. <method name="set_recording_active">
  29. <return type="void">
  30. </return>
  31. <argument index="0" name="record" type="bool">
  32. </argument>
  33. <description>
  34. If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
  35. </description>
  36. </method>
  37. </methods>
  38. <members>
  39. <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1">
  40. Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats.
  41. </member>
  42. </members>
  43. <constants>
  44. </constants>
  45. </class>