Closed Bug 1590652 Opened 6 years ago Closed 6 years ago

The audio input is badly distorted

Categories

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

72 Branch
Desktop
Windows 10
defect

Tracking

()

VERIFIED FIXED
mozilla72
Tracking Status
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 --- verified
firefox72 --- verified

People

(Reporter: danibodea, Assigned: padenot)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

Note

  • When the user attempts to use a test page that takes audio input and outputs instantly, he will notice that the audio is badly distorted.

Affected versions

  • Nightly yv71.0a2
  • Beta v71.0b3

Affected platforms

  • all

Steps to reproduce

  1. Open test page: https://mozilla.github.io/webrtc-landing/gum_test.html
  2. Click on Audio.
  3. Talk into the working and connected microphone.
  4. Observe audio output.

Expected result

  • The output is clear and easy to understand.

Actual result

  • The output is distorted.

Regression range
Logs:

2019-10-23T11:12:54: INFO : platform_version: 71.0a1
2019-10-23T11:13:18: INFO : Narrowed inbound regression window from [9596d7f4, e71921b7] (3 builds) to [375f9429, e71921b7] (2 builds) (~1 steps left)
2019-10-23T11:13:18: DEBUG : Starting merge handling...
2019-10-23T11:13:18: DEBUG : Using url: https://hg.mozilla.org/mozilla-central/json-pushes?changeset=e71921b729c6c61c9f2c7b6b84cf0db58543d28f&full=1
2019-10-23T11:13:20: DEBUG : Found commit message:
Bug 1540029 - part 7: Replace `HTMLEditRules::GetAlignment()` with new stack only class r=m_kato 
Differential Revision: https://phabricator.services.mozilla.com/D45789
2019-10-23T11:13:20: DEBUG : Did not find a branch, checking all integration branches
2019-10-23T11:13:20: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=e71921b729c6c61c9f2c7b6b84cf0db58543d28f&full=1
2019-10-23T11:13:21: DEBUG : Using url: https://hg.mozilla.org/integration/mozilla-inbound/json-pushes?changeset=e71921b729c6c61c9f2c7b6b84cf0db58543d28f&full=1
2019-10-23T11:13:21: DEBUG : Repo 'autoland' seems to have the earliest push
2019-10-23T11:13:21: INFO : ************* Switching to autoland by process of elimination (no branch detected in commit message)

Additional notes

  • This issue is more about audio input than the Web Speech API feature, but it blocks testing, reason why I chose to set it as such. If incorrect, please change its component.
Blocks: 1248897

The regressor is very surprising. Naively it is impossible, unless its trashing memory it doesn't own.

When you run mozregression, could you make sure the pref media.getusermedia.aec_enabled is false? Otherwise the AEC might cause distortions too.

Do you have an audio recording of the distortion?

Flags: needinfo?(daniel.bodea)

I have ran mozregression a few more times to see whether it gives a constant result or not and I got a different result, but the same both times:

2019-10-23T14:34:48: INFO : Narrowed inbound regression window from [05044e24, 21823cc1] (3 builds) to [4279ae89, 21823cc1] (2 builds) (~1 steps left)
2019-10-23T14:34:48: DEBUG : Starting merge handling...
2019-10-23T14:34:48: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=21823cc121eb93bd13aecf27f8b88fc260eca40e&full=1
2019-10-23T14:34:49: DEBUG : Found commit message:
Bug 1575131 - Update libcubeb for IAudioClient3 support on Win10.  r=padenot
This picks up the work contributed by @ligfx in https://github.com/kinetiknz/cubeb/pull/530.
Differential Revision: https://phabricator.services.mozilla.com/D42590
2019-10-23T14:34:49: DEBUG : Did not find a branch, checking all integration branches
2019-10-23T14:34:49: INFO : The bisection is done.
2019-10-23T14:34:49: INFO : Stopped

It appears I have made an error the first time I attempted to regress the issue, but I have also discovered some other arguments regarding this issue:

  1. Flipping the "media.getusermedia.aec_enabled" pref will not change the result of this regression.
  2. When using a different type of headphones on the same system (USB headphones instead of double jack headphones), the issue would not reproduce, the output sound is clear.
  3. There are 2 sound output issues that I have confused: one is distortion (this bug) and the other is a fast variation of sound intensity/volume.
    Because of this, I have made another error of saying that the MAC OS 10.14 and Unubtu 18 also reproduce it, but these 2 only show the volume variation, also making it very hard to understand the output.
  4. I have also reproduced this issue on another Windows 10 system with another model of double jack headphones, so it is not unique to my system or headphones.
  5. Using the USB headphones, I have managed to make the "https://andrenatal.github.io/webspeechapi/" test page react and understand some of my words with the same reaction: "Sorry I didn't understand". On the other hand I have not managed to make Google Translate react to any of my audio input.

All considered, I still believe that this issue is valid but somewhat unrelated to the feature. I would like to determine the exact cause, but I'm out of ideas. Could it be connected to how double jack headphones work with specific soundcards? I have no deeper knowledge of how audio input/output works. Do you have any ideas on how to find the actual cause?

Flags: needinfo?(daniel.bodea)
Blocks: 1575131
No longer blocks: 1248897
OS: All → Windows 10

That makes more sense, thanks!

kinetik, can you take a look?

Component: Web Speech → Audio/Video: cubeb
Flags: needinfo?(kinetik)

This is a demo of the distortion. I don't know if this matters, but the initial output sound (while taking into the mic) has a correct pitch, but the playback after and download have a higher pitch.

We should start by disabling IAudioClient3, and then we can discuss about a fix. It's too late in the cycle to try a fix.

Assignee: nobody → padenot
Status: NEW → ASSIGNED
Flags: needinfo?(kinetik)
See Also: → 1590902
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1710e9a74a46 Temporarily revert to using IAudioClient on Windows 10. r=kinetik
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

This issue has been fixed in Nightly v72.0a1 from 2019-10-24.

Status: RESOLVED → VERIFIED

Comment on attachment 9103579 [details]
Bug 1590652 - Temporarily revert to using IAudioClient on Windows 10. r?kinetik

Beta/Release Uplift Approval Request

  • User impact if declined: Audio glitches of various sorts on Windows 10
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is commenting out code to revert to the state pre-bug 1575883 (not too long ago), and is just commenting out code.
  • String changes made/needed: none
Attachment #9103579 - Flags: approval-mozilla-beta?

Comment on attachment 9103579 [details]
Bug 1590652 - Temporarily revert to using IAudioClient on Windows 10. r?kinetik

Fix audio glitches on Windows, p2 early in the beta cycle, verified by QA in Nightly, uplift accepted for 71 beta 5, thanks!

Attachment #9103579 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

This issue still occurs on Beta v71.0b4 and it is fixed in Beta v71.0b5 in Windows 10. Fix verified.

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: