No sound in firefox 74.0 with ALSA on a certain website
Categories
(Core :: Audio/Video: cubeb, defect, P5)
Tracking
()
People
(Reporter: monsterovich, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
Steps to reproduce:
- Build firefox 74.0 with --enable-alsa option.
- Open souncloud.com
- Play any track.
Actual results:
While a track is playing, there is no sound at all.
Expected results:
The sound should've played.
P.S. If you set dom.webaudio.enabled to false, the sound will work again.
I discovered this solution here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1621309
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Nikolay, can you get us logs:
MOZ_LOG=cubeb:5,MediaTrackGraph:4 ./firefox
Thanks!
Reporter | ||
Comment 4•5 years ago
|
||
dom.webaudio.enabled is false: sound is working
In both logs I play two random tracks. Warnings are present in both cases.
Comment 5•5 years ago
|
||
Something is off when Firefox tries to open an ALSA backend, but there are no logs there. The error is probably in alsa_stream_init_single
if you want to debug (in media/libcubeb/src/cubeb_alsa.c
). I'm thinking maybe the latency requested is too small ?
I am seeing the same behavior with sites like chess.com where the sound effects will only play sometimes, like if I open youtube, play something with sound, and then go back to chess.com. Its really bizarre.
Comment 7•5 years ago
|
||
I can reproduce the issue using a short JavaScript snippet. This snippet works fine with plain ALSA:
var elem = new Audio('some_file.mp3');
elem.play();
This snippet doesn't work with plain ALSA. It'll produce the mute button in the tab header indicating that Firefox thinks it's playing sound but no sound comes out. It works fine when I build Firefox with pulseaudio support (even with pulseaudio shim like apulse):
var ctx = new window.AudioContext();
var elem = new Audio('some_file.mp3');
var track = ctx.createMediaElementSource(elem);
track.connect(ctx.destination);
elem.play();
Hi, I would like to know if this is considered a bug to be fixed, or if Firefox is only going to support pulseaudio and there is no intention to fix this to support ALSA.
Please see https://github.com/kinetiknz/cubeb/wiki/Backend-Support for details on the different audio backends and their level of support. To summarize, patches for ALSA are always appreciated and the ALSA code is supported by community contributions.
Updated•2 years ago
|
Description
•