From 6b8eb8ebf1a2e64344ed8bd747638f2732fa6db7 Mon Sep 17 00:00:00 2001 From: Akosmo Date: Thu, 12 Feb 2026 11:33:50 -0300 Subject: [PATCH] Add missing info to some AudioStream docs --- doc/classes/AudioStream.xml | 2 +- doc/classes/AudioStreamGenerator.xml | 1 + doc/classes/AudioStreamMicrophone.xml | 1 + doc/classes/AudioStreamPlaybackResampled.xml | 5 +++++ doc/classes/AudioStreamPolyphonic.xml | 1 + doc/classes/AudioStreamRandomizer.xml | 1 + doc/classes/AudioStreamWAV.xml | 1 + .../doc_classes/AudioStreamInteractive.xml | 1 + .../doc_classes/AudioStreamPlaybackPlaylist.xml | 1 + .../doc_classes/AudioStreamPlaybackSynchronized.xml | 2 ++ .../doc_classes/AudioStreamPlaylist.xml | 2 ++ .../doc_classes/AudioStreamSynchronized.xml | 1 + modules/mp3/doc_classes/AudioStreamMP3.xml | 9 +++++++-- modules/vorbis/doc_classes/AudioStreamOggVorbis.xml | 9 +++++++-- .../vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml | 2 ++ 15 files changed, 34 insertions(+), 5 deletions(-) diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 9a4c2b2af5..eebe53d0cd 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -4,7 +4,7 @@ Base class for audio streams. - Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamWAV]) and Ogg (via [AudioStreamOggVorbis]) file formats. + Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamWAV]), Ogg (via [AudioStreamOggVorbis]), and MP3 (via [AudioStreamMP3]) file formats. $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml index 13d0ff4b55..45f5b3e2e6 100644 --- a/doc/classes/AudioStreamGenerator.xml +++ b/doc/classes/AudioStreamGenerator.xml @@ -63,6 +63,7 @@ [b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz. + $DOCS_URL/tutorials/audio/audio_streams.html https://godotengine.org/asset-library/asset/2759 diff --git a/doc/classes/AudioStreamMicrophone.xml b/doc/classes/AudioStreamMicrophone.xml index 2225ad2d35..90624f8381 100644 --- a/doc/classes/AudioStreamMicrophone.xml +++ b/doc/classes/AudioStreamMicrophone.xml @@ -8,6 +8,7 @@ [b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. + $DOCS_URL/tutorials/audio/audio_streams.html $DOCS_URL/tutorials/audio/recording_with_microphone.html https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record diff --git a/doc/classes/AudioStreamPlaybackResampled.xml b/doc/classes/AudioStreamPlaybackResampled.xml index 61715c03e0..c2c7fe5af7 100644 --- a/doc/classes/AudioStreamPlaybackResampled.xml +++ b/doc/classes/AudioStreamPlaybackResampled.xml @@ -1,8 +1,10 @@ + Playback class used for resampled [AudioStream]s. + Playback class used to mix an [AudioStream]'s audio samples to [method AudioServer.get_mix_rate] using cubic interpolation. @@ -10,6 +12,7 @@ + Returns an [AudioStream]'s sample rate, in Hz. Used to perform resampling. @@ -17,11 +20,13 @@ + Called by [method begin_resample] to mix an [AudioStream] to [method AudioServer.get_mix_rate]. Uses [method _get_stream_sampling_rate] as the source sample rate. Returns the number of mixed frames. + Called when an [AudioStream] is played. Clears the cubic interpolation history and starts mixing by calling [method _mix_resampled]. diff --git a/doc/classes/AudioStreamPolyphonic.xml b/doc/classes/AudioStreamPolyphonic.xml index 49c6aebaa5..e69637b207 100644 --- a/doc/classes/AudioStreamPolyphonic.xml +++ b/doc/classes/AudioStreamPolyphonic.xml @@ -8,6 +8,7 @@ Playback control is done via the [AudioStreamPlaybackPolyphonic] instance set inside the player, which can be obtained via [method AudioStreamPlayer.get_stream_playback], [method AudioStreamPlayer2D.get_stream_playback] or [method AudioStreamPlayer3D.get_stream_playback] methods. Obtaining the playback instance is only valid after the [code]stream[/code] property is set as an [AudioStreamPolyphonic] in those players. + $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/doc/classes/AudioStreamRandomizer.xml b/doc/classes/AudioStreamRandomizer.xml index 91b6c4df78..2b59d78f77 100644 --- a/doc/classes/AudioStreamRandomizer.xml +++ b/doc/classes/AudioStreamRandomizer.xml @@ -7,6 +7,7 @@ Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback. + $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/doc/classes/AudioStreamWAV.xml b/doc/classes/AudioStreamWAV.xml index e3685ce949..28c03178b6 100644 --- a/doc/classes/AudioStreamWAV.xml +++ b/doc/classes/AudioStreamWAV.xml @@ -8,6 +8,7 @@ This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation. + $DOCS_URL/tutorials/audio/audio_streams.html $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/interactive_music/doc_classes/AudioStreamInteractive.xml b/modules/interactive_music/doc_classes/AudioStreamInteractive.xml index d47d6ecde6..ea95a1a31e 100644 --- a/modules/interactive_music/doc_classes/AudioStreamInteractive.xml +++ b/modules/interactive_music/doc_classes/AudioStreamInteractive.xml @@ -8,6 +8,7 @@ The way this is used is by filling a number of clips, then configuring the transition table. From there, clips are selected for playback and the music will smoothly go from the current to the new one while using the corresponding transition rule defined in the transition table. + $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml b/modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml index 2553563071..3bc1b13831 100644 --- a/modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml +++ b/modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml @@ -4,6 +4,7 @@ Playback class used for [AudioStreamPlaylist]. + Playback component of [AudioStreamPlaylist]. Handles the playback of multiple [AudioStream]s in sequence. diff --git a/modules/interactive_music/doc_classes/AudioStreamPlaybackSynchronized.xml b/modules/interactive_music/doc_classes/AudioStreamPlaybackSynchronized.xml index adaae0fef9..93bb3145ca 100644 --- a/modules/interactive_music/doc_classes/AudioStreamPlaybackSynchronized.xml +++ b/modules/interactive_music/doc_classes/AudioStreamPlaybackSynchronized.xml @@ -1,8 +1,10 @@ + Playback class used for [AudioStreamSynchronized]. + Playback component of [AudioStreamSynchronized]. Handles the playback of multiple [AudioStream]s in synchrony. diff --git a/modules/interactive_music/doc_classes/AudioStreamPlaylist.xml b/modules/interactive_music/doc_classes/AudioStreamPlaylist.xml index eb7e1806db..e12cab1374 100644 --- a/modules/interactive_music/doc_classes/AudioStreamPlaylist.xml +++ b/modules/interactive_music/doc_classes/AudioStreamPlaylist.xml @@ -4,8 +4,10 @@ [AudioStream] that includes sub-streams and plays them back like a playlist. + An audio stream that can play back sub-streams in sequence. Streams can be added to the Playlist with [method set_list_stream], and shuffled with [member shuffle]. + $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/modules/interactive_music/doc_classes/AudioStreamSynchronized.xml b/modules/interactive_music/doc_classes/AudioStreamSynchronized.xml index e554eaeb5a..d7b2ae0c48 100644 --- a/modules/interactive_music/doc_classes/AudioStreamSynchronized.xml +++ b/modules/interactive_music/doc_classes/AudioStreamSynchronized.xml @@ -7,6 +7,7 @@ This is a stream that can be fitted with sub-streams, which will be played in-sync. The streams begin at exactly the same time when play is pressed, and will end when the last of them ends. If one of the sub-streams loops, then playback will continue. + $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/modules/mp3/doc_classes/AudioStreamMP3.xml b/modules/mp3/doc_classes/AudioStreamMP3.xml index 6eb665b048..1035da8b89 100644 --- a/modules/mp3/doc_classes/AudioStreamMP3.xml +++ b/modules/mp3/doc_classes/AudioStreamMP3.xml @@ -4,10 +4,12 @@ MP3 audio stream driver. - MP3 audio stream driver. See [member data] if you want to load an MP3 file at run-time. + MP3 audio stream driver. See [member data] if you want to load an MP3 file at run-time. More info can be found in [ResourceImporterMP3]. [b]Note:[/b] This class can optionally support legacy MP1 and MP2 formats, provided that the engine is compiled with the [code]minimp3_extra_formats=yes[/code] SCons option. These extra formats are not enabled by default. + $DOCS_URL/tutorials/audio/audio_streams.html + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html @@ -27,10 +29,13 @@ + The number of beats within a single bar in the audio track. + The length of the audio track, in beats. The actual duration of the audio file might be longer than what is indicated by this property. It defines the end of the audio for looping, [AudioStreamPlaylist], and [AudioStreamInteractive]. + The tempo of the audio track, measured in beats per minute. Contains the audio data in bytes. @@ -55,7 +60,7 @@ [/codeblocks] - If [code]true[/code], the stream will automatically loop when it reaches the end. + If [code]true[/code], the stream will play again from the specified [member loop_offset] once it reaches the end of the audio track, or once it reaches the end of the last beat according to the amount specified in [member beat_count]. Useful for ambient sounds and background music. Time in seconds at which the stream starts after being looped. diff --git a/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml index 5f144baa31..9117d6c591 100644 --- a/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml +++ b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml @@ -4,9 +4,11 @@ A class representing an Ogg Vorbis audio stream. - The AudioStreamOggVorbis class is a specialized [AudioStream] for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the [AudioStreamWAV] class. + The AudioStreamOggVorbis class is a specialized [AudioStream] for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. More info can be found in [ResourceImporterOggVorbis]. + This class is part of the audio stream system, which also supports WAV files through the [AudioStreamWAV] class, and MP3 files through the [AudioStreamMP3] class. + $DOCS_URL/tutorials/audio/audio_streams.html $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html @@ -27,13 +29,16 @@ + The number of beats within a single bar in the audio track. + The length of the audio track, in beats. The actual duration of the audio file might be longer than what is indicated by this property. It defines the end of the audio for looping, [AudioStreamPlaylist], and [AudioStreamInteractive]. + The tempo of the audio track, measured in beats per minute. - If [code]true[/code], the audio will play again from the specified [member loop_offset] once it is done playing. Useful for ambient sounds and background music. + If [code]true[/code], the stream will play again from the specified [member loop_offset] once it reaches the end of the audio track, or once it reaches the end of the last beat according to the amount specified in [member beat_count]. Useful for ambient sounds and background music. Time in seconds at which the stream starts after being looped. diff --git a/modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml b/modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml index 54a60262a7..92d74b0c5a 100644 --- a/modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml +++ b/modules/vorbis/doc_classes/AudioStreamPlaybackOggVorbis.xml @@ -1,8 +1,10 @@ + Playback class used for [AudioStreamOggVorbis]. + Playback component of [AudioStreamOggVorbis]. Uses [OggPacketSequencePlayback] for playback data.