-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve AudioStreamGenerator and AudioEffectSpectrumAnalyzer documentation #48682
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" version="4.0"> | ||
<brief_description> | ||
Plays back audio generated using [AudioStreamGenerator]. | ||
</brief_description> | ||
<description> | ||
This class is meant to be used with [AudioStreamGenerator] to play back the generated audio in real-time. | ||
</description> | ||
<tutorials> | ||
<link title="Audio generator demo project">https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link> | ||
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> | ||
<link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link> | ||
</tutorials> | ||
<methods> | ||
<method name="can_push_buffer" qualifiers="const"> | ||
|
@@ -14,18 +17,21 @@ | |
<argument index="0" name="amount" type="int"> | ||
</argument> | ||
<description> | ||
Returns [code]true[/code] if a buffer of the size [code]amount[/code] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise. | ||
</description> | ||
</method> | ||
<method name="clear_buffer"> | ||
<return type="void"> | ||
</return> | ||
<description> | ||
Clears the audio sample data buffer. | ||
</description> | ||
</method> | ||
<method name="get_frames_available" qualifiers="const"> | ||
<return type="int"> | ||
</return> | ||
<description> | ||
Returns the number of audio data frames left to play. If this returned number reaches [code]0[/code], the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking. | ||
</description> | ||
</method> | ||
<method name="get_skips" qualifiers="const"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does anyone know what the |
||
|
@@ -40,6 +46,7 @@ | |
<argument index="0" name="frames" type="PackedVector2Array"> | ||
</argument> | ||
<description> | ||
Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDNative, but [method push_buffer] may be [i]less[/i] efficient in GDScript. | ||
</description> | ||
</method> | ||
<method name="push_frame"> | ||
|
@@ -48,6 +55,7 @@ | |
<argument index="0" name="frame" type="Vector2"> | ||
</argument> | ||
<description> | ||
Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDNative, but [method push_frame] may be [i]more[/i] efficient in GDScript. | ||
</description> | ||
</method> | ||
</methods> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone know what the
tap_back_pos
property is used for? I'd like to get 100% documentation completion on this class 🙂