godot icon indicating copy to clipboard operation
godot copied to clipboard

AudioStreamPlayer pitch_scale ignored in Web unless tweened

Open michaelgundlach opened this issue 1 year ago • 0 comments

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

  1. Open attached test project
  2. Run in Godot, click each of the buttons. Each causes a normal ding and a high ding.
  3. 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.)

Minimal reproduction project (MRP)

test.zip

michaelgundlach avatar Oct 01 '24 17:10 michaelgundlach