AudioStreamGeneratorPlayback.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Plays back audio generated using [AudioStreamGenerator].
  5. </brief_description>
  6. <description>
  7. This class is meant to be used with [AudioStreamGenerator] to play back the generated audio in real-time.
  8. </description>
  9. <tutorials>
  10. <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
  11. <link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
  12. </tutorials>
  13. <methods>
  14. <method name="can_push_buffer" qualifiers="const">
  15. <return type="bool" />
  16. <argument index="0" name="amount" type="int" />
  17. <description>
  18. Returns [code]true[/code] if a buffer of the size [code]amount[/code] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise.
  19. </description>
  20. </method>
  21. <method name="clear_buffer">
  22. <return type="void" />
  23. <description>
  24. Clears the audio sample data buffer.
  25. </description>
  26. </method>
  27. <method name="get_frames_available" qualifiers="const">
  28. <return type="int" />
  29. <description>
  30. Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is [code]0[/code], the buffer is full.
  31. </description>
  32. </method>
  33. <method name="get_skips" qualifiers="const">
  34. <return type="int" />
  35. <description>
  36. </description>
  37. </method>
  38. <method name="push_buffer">
  39. <return type="bool" />
  40. <argument index="0" name="frames" type="PoolVector2Array" />
  41. <description>
  42. Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDNative, but [method push_buffer] may be [i]less[/i] efficient in GDScript.
  43. </description>
  44. </method>
  45. <method name="push_frame">
  46. <return type="bool" />
  47. <argument index="0" name="frame" type="Vector2" />
  48. <description>
  49. Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDNative, but [method push_frame] may be [i]more[/i] efficient in GDScript.
  50. </description>
  51. </method>
  52. </methods>
  53. <constants>
  54. </constants>
  55. </class>