godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.24k stars 19.6k forks source link

Cracking sound in Samsung Internet #88857

Open kaiec opened 5 months ago

kaiec commented 5 months ago

Tested versions

4.2.1

System information

HTML5 Web export, on Samsung Browser (Samsung Galaxy A52S), confirmed in several other Samsung devices

Issue description

When running an HTML export in the Samsung Browser (which is the default browser on many Samsung devices when links are opened in WhatsApp or Discord), the sound is cracking. It improves when the latency is set to its maximum of 100, but it is still there. Tested with all kinds of mix rate combinations (0 to 48000), makes no difference.

Saw this also in other games developed in Godot for a game jam. Unity games do not show such an issue. Everything else runs fine in the Samsung Browser so this is really bad as many people share links to games via WhatsApp and then the Audio is broken while everything runs fine in Chrome Mobile.

Steps to reproduce

New project, add an audio stream player, use any kind of music file to play, be it ogg, mp3 or wav, any mix rate. Export to HTML5, open in Samsung Browser on an Android device.

Here is a published test project: https://kaiec.itch.io/samsung-godot-test

Minimal reproduction project (MRP)

godot-samsung.zip

kaiec commented 5 months ago

Some more infos: I use Samsung Internet (the official name) in the latest Version 23.0.1.1. The browser is based on Chromium, which is weird considering that Chrome does not have these problems. Edge, which is also Chromium-based, also seems to work fine. More info about the browser: https://en.wikipedia.org/wiki/Samsung_Internet

Update: The beta version has the same problem.

adamscott commented 5 months ago

Did you export your game with the no-thread option? If so, this is a duplicate of #87329 and not related at all with Samsung Internet.

kaiec commented 5 months ago

No, I left all settings on default for the MRP. I am on 4.2.1, where the setting is not included as far as I know. The sound works perfectly fine on all other exports and for the Web export the sound works on Desktop Firefox, Desktop Chrome and Android Chrome and Edge (both Chromium). Only Samsung Internet is not working, which unfortunately is a widely used browser due to being the default browser on all Samsung phones.

kus04e4ek commented 1 month ago

90906 was probably a duplicate of this, it's fixed in 4.3 and the fix is planned to be cherry-picked for 4.2, try to use 4.3 beta 1 or set audio/driver/output_latency (not audio/driver/output_latency.web, just audio/driver/output_latency) to 50