[Bug 15747] Echo cancellation API

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15747

--- Comment #3 from Randell Jesup <rjesup@jesup.org> 2012-01-30 07:19:40 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > - is it correct to place this option on the PeerConnection?
> 
> I don't think it is. Echo cancellation should occur using output audio as close
> to the speakers as possible to cancel echo in input streams as close to the
> microphone as possible. It would seem to me the appropriate place would be
> either a LocalMediaStream or the corresponding audio track.
> 
> Even if (especially if!) you just planned to play back the stream locally,
> you'd want echo cancellation enabled. Alternatively, if didn't want to play or
> transmit the stream, but, e.g., just wanted to record it, or use it for
> visualization, or something else, you'd want to be able to shut echo
> cancellation off. No PeerConnection is involved in any of these cases.

That's correct; so we can move this to the LocalMediaStream.  We can assume
that the EC for input track (or tracks) knows what's being played out on the
hardware.  Avoiding the app telling the system what might be causing echo is
important since we'd like to have the EC cancel echo generated by *any* source,
not just outputs from within one JS app.  In systems where we can, we'll even
use a system EC since it has access to other processes writing to the audio
drivers.

One could move it to the track(s) instead.  I'm not sure the added granularity
is worth the added complexity; especially as this is the "override the default
handling" knob.  The usecase for this would be multiple audio inputs in a
single stream, where one is a headset and the other is the computer speakers
and mic. However, in almost all cases those two users would be close together,
and so the mic of the headset user would pick up echoes from the speakers on
the computer.

So my vote is "on the LocalMediaStream".

> 
> > - to which audio streams does echo cancellation apply, if there are several?
> > Should we ignore it and say "the implementation will do the best it can across
> > all streams"?
> 
> If you put the option at the LocalMediaStream level, I'd say "all of them"
> (assuming we even allow more than one). If you put it at the track level, then
> this question goes away.

Agree.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.

Received on Monday, 30 January 2012 07:19:46 UTC