Open Bug 957725 Opened 10 years ago Updated 2 years ago

mixed audio stream in tab would be useful for functional testing

Categories

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

defect

Tracking

()

People

(Reporter: dmosedale, Unassigned)

Details

It'd be useful to be able to get (a recording of?) to expose a loopback of the all the mixed audio from a browser tab someplace.  This would make it possible to write functional tests to compare whether the audio being heard by a user is what is expected to be heard.  The simplest use case would be to ensure that things like A/V conference apps don't regress basic functionality (eg transmitted sound being played).  I would imagine this would be even more useful for complex audio setups using WebAudio.

Note however, that there's nothing really WebAudio specific here, so I'm not convinced this is filed in the right component.
There are existing methods to capture, but not tab-specific, as far as I have worked out at least.

MOZ_DUMP_AUDIO may be useful, but I haven't used this.

parecord provides allows capturing of device output, when using pulseaudio.  I assume other platforms have something similar, and I would like to know how to (ask bug reporters to) use them.  Each AudioContext has a separate stream, and I expect pulseaudio allows capturing individual streams be recorded, but I haven't worked out how to do that with parecrod.
It is very easy when using PulseAudio and WASAPI on Windows: there is an API we can use to be able to record the output stream.

OSX and Android (incl. b2g) don't have such capabilities, Alsa sometimes has it (it depends on the driver), winmm also sometimes has it (also depends on the hw/driver).
This is related to the work needed to properly support mixed echo cancellation across all platforms; to do that we'll need to do one (or more) of: use system AECs, get mixed audio streams (including other processes) from the OS, get mixed browser audio stream from the audio backend (pulse, etc), or get mixed browser audio streams from cubeb.  See bug 694814 and related bugs
Component: Web Audio → Video/Audio
Component: Audio/Video → Audio/Video: MSG/cubeb/GMP
Rank: 29
Component: Audio/Video: MediaStreamGraph → Audio/Video: cubeb
Priority: -- → P2
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.