Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
The current documentation for AudioStreamPlayer, AudioStreamPlayer2D, and AudioStreamPlayer3D's pitch_scale getter/setters describe the following:
The current wording does not make it immediately clear that the value is a multiplier rather than an offset, and also implies that the audio itself is manipulated rather than just the sample rate at playback. It's not covered in the documentation guidelines that I can see, but member getter/setter docs for other classes seem to describe the member rather than the action of the getter/setter.
I'd like to propose the following as a more clear alternative, though the notion of samples is not present elsewhere in these classes' API docs and might need changing.
It doesn't feel sufficient to use "the audio" or AudioStream to refer to this, as "the audio" is already used to refer to the mixed output of all samples being played by this AudioStreamPlayer, and while AudioStream more or less maps to an individual audio sample, setting the AudioStreamPlayer's pitch_scale property doesn't touch any of the AudioStream's properties, and is applied in addition to the AudioStream's mix_rate.