a40fe16866
Implements a way for audio stream playback to be configured via parameters directly in the edited AudioStreamPlayer[2D/3D]. Currently, configuring the playback stream is not possible (or is sometimes hacky as the user has to obtain the currently played stream, which is not always immediately available). This PR only implements this new feature to control looping in stream playback instances (a commonly requested feature, which was lost in the transition from Godot 2 to Godot 3). But the idea is that it can do a lot more: * If effects are bundled to the stream, control per playback instance parameters such as cutoff or resoance, or any other exposed effect parameter per playback instance. * For the upcoming interactive music PR (#64488), this exposes an easy way to change the active clip, which was not possible before. * For the upcoming parametrizable audio support (https://github.com/godotengine/godot-proposals/issues/3394) this allows editing and animating audio graph parameters. In any case, this PR is required to complete #64488. Update modules/vorbis/audio_stream_ogg_vorbis.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update modules/minimp3/audio_stream_mp3.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update modules/minimp3/audio_stream_mp3.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update modules/vorbis/audio_stream_ogg_vorbis.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update doc/classes/AudioStream.xml Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
74 lines
2.4 KiB
XML
74 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="AudioStreamPlayback" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
Meta class for playing back audio.
|
|
</brief_description>
|
|
<description>
|
|
Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOggVorbis] for usage.
|
|
</description>
|
|
<tutorials>
|
|
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="_get_loop_count" qualifiers="virtual const">
|
|
<return type="int" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_get_parameter" qualifiers="virtual const">
|
|
<return type="Variant" />
|
|
<param index="0" name="name" type="StringName" />
|
|
<description>
|
|
Return the current value of a playback parameter by name (see [method AudioStream._get_parameter_list]).
|
|
</description>
|
|
</method>
|
|
<method name="_get_playback_position" qualifiers="virtual const">
|
|
<return type="float" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_is_playing" qualifiers="virtual const">
|
|
<return type="bool" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_mix" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="buffer" type="AudioFrame*" />
|
|
<param index="1" name="rate_scale" type="float" />
|
|
<param index="2" name="frames" type="int" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_seek" qualifiers="virtual">
|
|
<return type="void" />
|
|
<param index="0" name="position" type="float" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_set_parameter" qualifiers="virtual">
|
|
<return type="void" />
|
|
<param index="0" name="name" type="StringName" />
|
|
<param index="1" name="value" type="Variant" />
|
|
<description>
|
|
Set the current value of a playback parameter by name (see [method AudioStream._get_parameter_list]).
|
|
</description>
|
|
</method>
|
|
<method name="_start" qualifiers="virtual">
|
|
<return type="void" />
|
|
<param index="0" name="from_pos" type="float" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_stop" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="_tag_used_streams" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
</class>
|