class_audiostreamplaybackinteractive.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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/modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml.
  6. .. _class_AudioStreamPlaybackInteractive:
  7. AudioStreamPlaybackInteractive
  8. ==============================
  9. **Inherits:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Playback component of :ref:`AudioStreamInteractive<class_AudioStreamInteractive>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Playback component of :ref:`AudioStreamInteractive<class_AudioStreamInteractive>`. Contains functions to change the currently played clip.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`get_current_clip_index<class_AudioStreamPlaybackInteractive_method_get_current_clip_index>`\ (\ ) |const| |
  22. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | |void| | :ref:`switch_to_clip<class_AudioStreamPlaybackInteractive_method_switch_to_clip>`\ (\ clip_index\: :ref:`int<class_int>`\ ) |
  24. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | |void| | :ref:`switch_to_clip_by_name<class_AudioStreamPlaybackInteractive_method_switch_to_clip_by_name>`\ (\ clip_name\: :ref:`StringName<class_StringName>`\ ) |
  26. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. .. rst-class:: classref-section-separator
  28. ----
  29. .. rst-class:: classref-descriptions-group
  30. Method Descriptions
  31. -------------------
  32. .. _class_AudioStreamPlaybackInteractive_method_get_current_clip_index:
  33. .. rst-class:: classref-method
  34. :ref:`int<class_int>` **get_current_clip_index**\ (\ ) |const| :ref:`🔗<class_AudioStreamPlaybackInteractive_method_get_current_clip_index>`
  35. Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with :ref:`AudioStreamInteractive.get_clip_name()<class_AudioStreamInteractive_method_get_clip_name>`.
  36. \ **Example:** Get the currently playing clip name from inside an :ref:`AudioStreamPlayer<class_AudioStreamPlayer>` node.
  37. .. tabs::
  38. .. code-tab:: gdscript
  39. var playing_clip_name = stream.get_clip_name(get_stream_playback().get_current_clip_index())
  40. .. rst-class:: classref-item-separator
  41. ----
  42. .. _class_AudioStreamPlaybackInteractive_method_switch_to_clip:
  43. .. rst-class:: classref-method
  44. |void| **switch_to_clip**\ (\ clip_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_AudioStreamPlaybackInteractive_method_switch_to_clip>`
  45. Switch to a clip (by index).
  46. .. rst-class:: classref-item-separator
  47. ----
  48. .. _class_AudioStreamPlaybackInteractive_method_switch_to_clip_by_name:
  49. .. rst-class:: classref-method
  50. |void| **switch_to_clip_by_name**\ (\ clip_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AudioStreamPlaybackInteractive_method_switch_to_clip_by_name>`
  51. Switch to a clip (by name).
  52. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  53. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  54. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  55. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  56. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  57. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  58. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  59. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  60. .. |void| replace:: :abbr:`void (No return value.)`