Open Bug 1837578 Opened 1 year ago Updated 1 year ago

Audio distortion issue with Mobile Firefox on Samsung phone

Categories

(Core :: WebRTC: Audio/Video, defect, P3)

Firefox 113
Unspecified
Android
defect

Tracking

()

People

(Reporter: vic.yang, Assigned: pehrsons)

References

(Depends on 2 open bugs)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Firefox for Android

Steps to reproduce:

Open https://webrtc.github.io/samples/src/content/getusermedia/audio/
Allow the microphone permission
Test the audio

Test models:
Samsung s21 FE ,Samsung s22, Google Pixel, Samsung Tab

Actual results:

Audio distortion

Expected results:

Audio quality is fine.

Also, we tested the same site with Android Chrome and didn't have the audio issue.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Component: Audio/Video: Playback → WebRTC: Audio/Video
OS: Unspecified → Android

Can confirm on a Pixel 6a / Android 13. apehrson, would you have any thoughts here?

Severity: -- → S3
Flags: needinfo?(apehrson)
Priority: -- → P3
Status: UNCONFIRMED → NEW
Ever confirmed: true

Do you have a recording of said distortion?

If I gradually turn up the volume I first hear some high-frequency ringing feedback that the AEC tries to get under control, then some clipping of my voice that I'd probably call distortion. I think this is the AEC struggling a bit because our feedback loop is so tight. Note that Chromium has a different architecture so they inherently have longer latency between input and output.

If I try a demo that is slightly more realistic (higher mic->speaker latency) it sounds better: https://webrtc.github.io/samples/src/content/peerconnection/audio/
I still hear some ringing feedback but nothing major. I expect it to go away if the remote peer is in another room and employs its own AEC.

Note that the AEC is intended to remove what was just played through your speakers from the mic input. Passing the mic input straight out to the speakers is the most extreme you can go, as the AEC will have a hard time telling whether the input is the legit input from the current callback, or whether it's echo from the previous callback. If there are N callbacks in between this is easier because the sound waves in said callbacks are not so similar (current vs N callbacks ago). A callback typically contains a handful of milliseconds worth of audio.

Flags: needinfo?(apehrson)

Added recording, using Samsung tab with WebRTC GitHub sample.
Distortion of sound can be clearly heard.

Thank you. IIRC Chromium will also lower the input volume when something plays through the speakers, which will help with issues like this. I'll see if I can tweak our audio processing settings to enable that mode.

Assignee: nobody → apehrson
See Also: → 1628779
Depends on: 1404965
Depends on: 1839885

(In reply to Andreas Pehrson [:pehrsons] from comment #6)

Thank you. IIRC Chromium will also lower the input volume when something plays through the speakers, which will help with issues like this. I'll see if I can tweak our audio processing settings to enable that mode.

This is wrong. The main trick seems to be that they use the Android platform audio effects (AEC and friends). We don't have those wired up yet, but I filed bug 1839885 for this.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: