Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crackling audio playback on Chrome with HTML5 threads export (AudioWorklet) #47487

Closed
davcri opened this issue Mar 30, 2021 · 5 comments
Closed

Comments

@davcri
Copy link
Contributor

davcri commented Mar 30, 2021

Godot version: 3.3rc6

OS/device including version:

Manjaro Linux + Chrome 89.0.4389.90.

More HW/SW info:
System:
  Kernel: 5.11.6-1-MANJARO x86_64 bits: 64 Desktop: Cinnamon 4.8.6 
  Distro: Manjaro Linux 
Machine:
  Type: Desktop System
  Mobo: ASUSTeK model: ROG STRIX B550-F GAMING (WI-FI) v: Rev X.0x 
CPU:
  Info: 8-Core model: AMD Ryzen 7 3700X bits: 64 type
Graphics:
  Device-1: NVIDIA TU116 [GeForce GTX 1650 SUPER] driver: nvidia v: 460.56 
  Display: x11 server: X.Org 1.20.10 driver: loaded: nvidia resolution: 
  1: 1920x1080~60Hz 2: 1600x900~60Hz 
  OpenGL: renderer: GeForce GTX 1650 SUPER/PCIe/SSE2 v: 4.6.0 NVIDIA 460.56 
Audio:
  Device-1: NVIDIA TU116 High Definition Audio driver: snd_hda_intel 
  Device-2: AMD Starship/Matisse HD Audio driver: snd_hda_intel  (this one it's actually connected to the speakers)
  Device-3: RODE Microphones RODE NT-USB type: USB 
  driver: hid-generic,snd-usb-audio,usbhid 
  Sound Server-1: ALSA v: k5.11.6-1-MANJARO running: yes 
  Sound Server-2: PulseAudio v: 14.2 running: yes 

Issue description:
Audio playback has crackling noises on Chrome with HTML5 threads export. Follows up a discussion from #43210

Some tests that I did with my HW/SW setup:

  • Issue it's still there with older Chrome versions (80, 86)
  • Changing the output latency to 100ms doesn't mitigate the issue
  • Changing audio format to mp3 or ogg doesn't mitigate the issue
  • I cannot reproduce the issue on Firefox 87.0. Every combination of export and audio device works fine.
  • Video | Issue may be related to a specific combination of Chrome + motherboard audio card + audio driver: audio it's pretty bad on the motherboard audio (Starship/Matisse HD controller which it's my daily output audio device), but it's almost okay with the RODE-NT USB headphones output (it's a USB mic with integrated audio device).
    However it still has some audio crackling.
  • Video | Single-thread export plays audio better than multi-thread export

Steps to reproduce:
I can reproduce the issue by simply playing an audio file with the official Godot Web Editor (see video).

Minimal reproduction project:
Web Preview | Repo
Godot project with an AudioStreamPlayer playing a WAV audio. HTML5 exported with threads.

@akien-mga akien-mga changed the title Crackling audio playback on Chrome with HTML5 threads export Crackling audio playback on Chrome with HTML5 threads export (AudioWorklet) Mar 30, 2021
@akien-mga
Copy link
Member

Possibly the same issue as this upstream bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=1188901

@ianfife

This comment has been minimized.

@Faless
Copy link
Collaborator

Faless commented Mar 31, 2021

+1 Godot 3.2.3
https://amberstudios.itch.io/slimes-and-sawblades

It also has weird audio delay/repeat issues on top of the crackling.

That's not the threaded version, see: #47453

@davcri
Copy link
Contributor Author

davcri commented Apr 22, 2021

I have a good news and a bad news.

  • Good news: the issue disappeared after an upgrade of my system (Chrome 90.0, Linux 5.11.10). Now I can go to the MRP (https://davcri.github.io/godot-html5-thread-audio/) and the audio plays perfectly
  • Bad bews: I didn't understand what fixed the issue

I tried the MRP with older chrome builds but it seems to work just fine. So I guess that it was related to something with the SW/HW audio stack.

Sorry for the lack of information, let me know if I can make some other test.

@Faless
Copy link
Collaborator

Faless commented Jun 4, 2021

Maybe a driver issue fixed by the upgrade?
Closing anyway since it can no longer be reproduced.
Feel free to comment below if you experience the issue again and I'll reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants