AudioEffectRecord.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AudioEffectRecord" inherits="AudioEffect" version="4.0">
  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/latest/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. <description>
  17. Returns the recorded sample.
  18. </description>
  19. </method>
  20. <method name="is_recording_active" qualifiers="const">
  21. <return type="bool" />
  22. <description>
  23. Returns whether the recording is active or not.
  24. </description>
  25. </method>
  26. <method name="set_recording_active">
  27. <return type="void" />
  28. <argument index="0" name="record" type="bool" />
  29. <description>
  30. If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
  31. </description>
  32. </method>
  33. </methods>
  34. <members>
  35. <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1">
  36. Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats.
  37. </member>
  38. </members>
  39. </class>