class_audioeffectinstance.rst 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioEffectInstance.xml.
  6. .. _class_AudioEffectInstance:
  7. AudioEffectInstance
  8. ===================
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`AudioEffectSpectrumAnalyzerInstance<class_AudioEffectSpectrumAnalyzerInstance>`
  11. Manipulates the audio it receives for a given effect.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an :ref:`AudioEffect<class_AudioEffect>` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with :ref:`AudioServer.get_bus_effect_instance()<class_AudioServer_method_get_bus_effect_instance>`.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Audio buses <../tutorials/audio/audio_buses>`
  20. .. rst-class:: classref-reftable-group
  21. Methods
  22. -------
  23. .. table::
  24. :widths: auto
  25. +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | |void| | :ref:`_process<class_AudioEffectInstance_private_method__process>`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int<class_int>`\ ) |virtual| |required| |
  27. +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`_process_silence<class_AudioEffectInstance_private_method__process_silence>`\ (\ ) |virtual| |const| |
  29. +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. .. rst-class:: classref-section-separator
  31. ----
  32. .. rst-class:: classref-descriptions-group
  33. Method Descriptions
  34. -------------------
  35. .. _class_AudioEffectInstance_private_method__process:
  36. .. rst-class:: classref-method
  37. |void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int<class_int>`\ ) |virtual| |required| :ref:`🔗<class_AudioEffectInstance_private_method__process>`
  38. Called by the :ref:`AudioServer<class_AudioServer>` to process this effect. When :ref:`_process_silence()<class_AudioEffectInstance_private_method__process_silence>` is not overridden or it returns ``false``, this method is called only when the bus is active.
  39. \ **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it.
  40. .. rst-class:: classref-item-separator
  41. ----
  42. .. _class_AudioEffectInstance_private_method__process_silence:
  43. .. rst-class:: classref-method
  44. :ref:`bool<class_bool>` **_process_silence**\ (\ ) |virtual| |const| :ref:`🔗<class_AudioEffectInstance_private_method__process_silence>`
  45. Override this method to customize the processing behavior of this effect instance.
  46. Should return ``true`` to force the :ref:`AudioServer<class_AudioServer>` to always call :ref:`_process()<class_AudioEffectInstance_private_method__process>`, even if the bus has been muted or cannot otherwise be heard.
  47. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  48. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  49. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  50. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  51. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  52. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  53. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  54. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  55. .. |void| replace:: :abbr:`void (No return value.)`