Closed Bug 1687070 Opened 5 years ago Closed 4 years ago

Audio can't be heard (or can't be heard in the beginning) on Linux

Categories

(Core :: Audio/Video: cubeb, defect, P2)

defect

Tracking

()

VERIFIED FIXED
92 Branch
Tracking Status
firefox92 --- fixed
firefox95 --- verified

People

(Reporter: alwu, Assigned: padenot)

References

Details

Attachments

(4 files)

Recently I encountered this issue several times, but I didn't have a complete reproduce steps for that, because it's not 100% reproducible.

But lucky I got this profiled result while debugging bug1686169.

So when I was encountering this issue on jsfiddle, I did see the sound indicator showing on the tab, but I didn't hear any sound at all. I also encountered this issue before on my test website where the sound couldn't be heard in the beginning, but after a couple of seconds audio would start being heard.

Attached file about:support

I'm on Ubuntu 20.04, and encountered this issue on both Release 84 and latest Nightly.

Sounds like audioipc take a while to init, and that would explain why it's a problem on windows as well, now.

Actually no. But I think I can repro what you describe, but rarely.

(In reply to Paul Adenot (:padenot) from comment #3)

Actually no. But I think I can repro what you describe, but rarely.

Yes that happens sometime, but not really frequently.

Severity: -- → S3
Priority: -- → P2

I have the same issue. I found out about it trying to load and audio file using Audio('myfile.mp3') and then trying to playback using .play(). Nothing was is heard in firefox, but it can be heard in Chrome. The file is 0.03 seconds long (it's a brick-drop effect sound).

In the beginning I though that firefox would not play mp3 files, but then I found some stackoverflow examples where it worked, so it had to be something else.

Can you give us a small test case so that we can try to reproduce the issue ?

Flags: needinfo?(troels)

I made a jsfiddle. Try it Firefox and Chrome

https://jsfiddle.net/91fjm3g6/

The short button will work in Chrome but not in Firefox. The long melody works as expected in both.

Flags: needinfo?(troels)

When playing the short hit sound Firefox shows in the tab that it is playing something, but nothing is heard. Also it doesn't display any sort of error.

I can reproduce this on this modified example as well. I will take a look on this later.

Assignee: nobody → alwu
Flags: needinfo?(alwu)

So this part of log is the same on both Windows and Linux, but I can listen to the short sound on Windows.

[Child 2162617: MediaDecoderStateMachine #1]: D/AudioStream 7fa4f3fd73a0 started, state STARTED
[Child 2162617: AudioIPC0]: V/MediaDecoder AudioSink=7fa4f789d800 playing audio at time=48000 offset=0 length=2304
[Child 2162617: MediaDecoderStateMachine #1]: V/MediaDecoder AudioSink=7fa4f789d800 AudioStream has used an audio packet.
[Child 2162617: AudioIPC0]: V/MediaDecoder AudioSink=7fa4f789d800 playing audio at time=48000 offset=0 length=767
[Child 2162617: MediaDecoderStateMachine #1]: V/MediaDecoder AudioSink=7fa4f789d800 AudioStream has used an audio packet.
[Child 2162617: AudioIPC0]: D/AudioStream 7fa4f3fd73a0 StateCallback, mState=1 cubeb_state=2
[Child 2162617: AudioIPC0]: D/AudioStream 7fa4f3fd73a0 Drained
[Child 2162617: MediaDecoderStateMachine #1]: D/MediaDecoder MediaDecoderStateMachine[7fa4f3f74000] Decoder=7fa4f3f0f400 [OnMediaSinkAudioComplete]
[Child 2162617: MediaDecoderStateMachine #1]: D/MediaDecoder MediaDecoderStateMachine[7fa4f3f74000] Decoder=7fa4f3f0f400 StopPlayback()

We did send two audio samples to the audio backend, but didn't hear anything. I suspect that might be related with cubeb, paul, do you have time to check this issue?
Thank you.

Flags: needinfo?(alwu) → needinfo?(padenot)

Indeed, this is fixed by https://github.com/mozilla/cubeb-pulse-rs/pull/69. Stealing the bug because I wrote a patch.

Assignee: alwu → padenot
Flags: needinfo?(padenot)

Depends on D119954

Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fd7fa895cdef Update pulse-rust to revision c3a51357f. r=cubeb-reviewers,kinetik https://hg.mozilla.org/integration/autoland/rev/65dd5e6a60fe mach vendor rust. r=cubeb-reviewers,kinetik
Backout by mlaza@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c2892b452a7 Backed out 2 changesets for causing failures on cubeb.drain, cubeb.tone. CLOSED TREE

Backed out for causing failures on cubeb.drain, cubeb.tone.
Backout link
Push with failures
Failure Log for cubeb.drain
Failure Log for cubeb.tone

Flags: needinfo?(padenot)
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa8fd2516b14 Update pulse-rust to revision c3a51357f. r=cubeb-reviewers,kinetik https://hg.mozilla.org/integration/autoland/rev/ee41f75ed409 mach vendor rust. r=cubeb-reviewers,kinetik
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Flags: needinfo?(padenot)
See Also: → 1730499
Regressions: 1730499

I was able to reproduce the issue on Ubuntu 20.4 using 87.0a1(20210131211743) and link https://jsfiddle.net/97c3g2js/ . Verified as fixed on Ubuntu 20.4, Win 10 and Mac 10.13 using 95.0 (20211129150630).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: