godot/modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml
2024-12-10 07:34:02 -03:00

39 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlaybackInteractive" inherits="AudioStreamPlayback" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Playback component of [AudioStreamInteractive].
</brief_description>
<description>
Playback component of [AudioStreamInteractive]. Contains functions to change the currently played clip.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_current_clip_index" qualifiers="const">
<return type="int" />
<description>
Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with [method AudioStreamInteractive.get_clip_name].
[b]Example:[/b] Get the currently playing clip name from inside an [AudioStreamPlayer] node.
[codeblocks]
[gdscript]
var playing_clip_name = stream.get_clip_name(get_stream_playback().get_current_clip_index())
[/gdscript]
[/codeblocks]
</description>
</method>
<method name="switch_to_clip">
<return type="void" />
<param index="0" name="clip_index" type="int" />
<description>
Switch to a clip (by index).
</description>
</method>
<method name="switch_to_clip_by_name">
<return type="void" />
<param index="0" name="clip_name" type="StringName" />
<description>
Switch to a clip (by name).
</description>
</method>
</methods>
</class>