godot
godot copied to clipboard
AudioStreamPlayer pitch_scale ignored in Web unless tweened
Tested versions
v4.3.stable.official [77dcf97d8] Chrome and Safari stable on M1 Mac. Brave on Android.
System information
Godot v4.3.stable - macOS 13.0.1 - Vulkan (Mobile) - integrated Apple M1 - Apple M1 (8 Threads)
Issue description
Setting AudioStreamPlayer.pitch_scale has no effect on Web. Tweening it causes it to work, including tweening to the same value you just set it to, like
player.pitch_scale = 1.5 # optional
create_tween().tween_property(player, "pitch_scale", 1.5, .01)
AudioStreamPlayer2D does not have this bug.
Steps to reproduce
- Open attached test project
- Run in Godot, click each of the buttons. Each causes a normal ding and a high ding.
- Export to Web and run in a browser (e.g. via Remote Debug), or test at https://sorryrobot.com/pitchey .
Expected behavior: All buttons play a low ding then a high ding on Web.
Actual behavior:
All buttons work except for the first, which plays 2 normal dings. (This button is setting .pitch_scale on an AudioStreamPlayer and not tweening.)