(v4.3 regression) AudioServer.get_bus_peak_volume_left_db() does not work in Web export on v4.3.stable.official [77dcf97d8]
Tested versions
Issue is present in v4.3.stable.official [77dcf97d8] Issue was not present in v4.2.2.stable.official [15073afe3]
System information
Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.3623) - AMD Ryzen 5 3600X 6-Core Processor (12 Threads)
Issue description
This is a video of the minimal reproducible example working in-editor:
https://github.com/user-attachments/assets/0fbdd409-2593-44a7-9fb7-70e0c28fdf98
The following is a photo, but the video would look exactly the same since the value does not update when exported to Web.
Steps to reproduce
Export to web. Doesn't seem to matter which rendering mode is used.
Minimal reproduction project (MRP)
This project uses three nodes: A sound playing on a loop A label updating with the value of AudioServer.get_bus_peak_volume_left_db(0,0) A circle redrawing with size depending on the value of AudioServer.get_bus_peak_volume_left_db(0,0).
@adamscott If there is anything I can do to make this issue report more helpful, please let me know. Thanks!
@ericlamotte This is both a regression and not one at the same time. This happens because 4.3 uses by default "samples" (which uses the WebAudio API on the Web) instead of "streams", for quality and performance reasons.
But that change made it so that Godot doesn't mix itself the sound anymore, on the Web, but delegates that task to the browser, hence the value of 0 returned.
I could check if it's possible to reimplement with the new stack, but if it's absolutely needed, you can always revert to use "streams", either in the audio project properties or just change the type of playback of a specific audio stream node.
Thank you Adam, that makes sense. I will look into workarounds for my needs. Perhaps it would be helpful to others for the documentation for the AudioServer class to contain this information about this function not working with the default Web export settings. I considered adding an issue in the documentation repo, but I'm not sure which other functions might also be impacted.