Overhaul AudioStreamPlayer's documentation #81858
Merged
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.
Closes #76324.
Documents #71122 's behavior.
Continuation of similar past efforts with the same goal of refreshing the documentation up a notch.
AudioStreamPlayer's reference smelled old. A lot of information is missing. Not everything has to be documented, of course. That would severely impact readability, by making the class look more complicated than it actually is. This is a pretty common class for most users, and we have got to be careful.
PRs for AudioStreamPlayer2D and AudioStreamPlayer3D will come at a later date, after this one is merged.
stream
property;finished
signal is emitted more explicitly;MIX_TARGET_STEREO
being the default mix target.Methods
get_playback_position
get_stream_playback
has_stream_playback
true
;play
seek
stop
"Stops all audio" is it like... my entire system becomes deaf or something?
Properties
autoplay
bus
max_polyphony
mix_target
pitch_scale
playing
stream
stream_paused
volume_db
I don't think this PR is fully complete. The leading description needs a bit more to it. But, I wanted to express this PR's intentions as soon as possible. Feedback is very, very welcome.
In particular, I attempted to reduce verbosity by replacing "audio" when referring to the individual AudioStreamPlaybacks with "sounds". Saying "playback" all the time does not quite convince me as it's repetitive, and is not something that the common user will ever have to think about, so it's a puzzling situation.