Default maximum number of audio input streams, is too low. |
||||
Issue descriptionWe have an arbitrary default limit of 16 audio input track. This is an artificial limitation on top of what the OS offers and is shared for all tabs. A multi tracking audio application can easily use up this limit and if there are other users of tracks (speech recognition, webrtc, pepper, hotword, etc), then headroom is reduced further still. For some AudioManager implementations, we have increased the limit of *output* streams from the default 16 to a more reasonable (but seemingly arbitrarily chosen) 50. I suggest we increase the default for input and output to at least that number. Possibly 64 or 128 since multi tracking apps can use that much if the machine can handle it. Alternatively we could remove this artificial limit altogether since it's not chosen in relation to any specific hardware or configuration.
,
Jan 9 2017
Here's some data for output controllers (remember, not 1:1 streams), didn't see any for input streams: https://uma.googleplex.com/histograms/?endDate=latest&dayCount=1&histograms=Media.AudioRendererIpcStreamsTotal&fixupData=true&showMax=true&filters=isofficial%2Ceq%2CTrue&implicitFilters=isofficial I think there are enough bad/malicious pages that we should have some sort of limit. I'd be fine with removing all the overrides we have in the platform specific managers we have now and fixing the maximums to 64/64 in AudioManagerBase. At least for output streams this would cover ~100% of usage. Input streams might need a higher limit though since there is no mixing/demultiplexing of streams. That said, it seems we really only need 1 input stream per device (and per parameters?) and could demultiplex that more intelligently if we wanted. Presumably the OS is doing this under the hood, not sure if that complexity would be worth it on our side.
,
Jan 12 2017
From my experience with (consumer/semi pro/pro) audio interfaces and OS audio APIs I'd say that we'd benefit in terms of stability from opening each device as few times as possible and do splitting/mixing within our audio path.
,
Jan 13 2017
We have per tab sharing of audio input sources. So for example if an app makes 10 getUserMedia calls for the same microphone, only one audio stream will actually be opened.
,
Jan 13 2017
However, if two tabs access the same mic, we'll open it twice since the source sharing logic is implemented in the renderer. We can probably improve this but need to match the audio parameters, buffer size etc. That's probably what we should be doing regardless of the limit actually.
,
Jan 13 2017
Discussed with Henrik A. He's going to take a look and bump up the limit. It does look like we're hitting it.
,
Jan 13 2017
FYI, we have this stat for Mac in place today. It is only triggered when an input issue is detected hence the real numbers are higher. https://uma.googleplex.com/histograms/?endDate=20170111&dayCount=28&histograms=Media.Audio.NumberOfLowLatencyInputStreamsMac&fixupData=true&showMax=true&filters=channel%2Ceq%2C4%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial
,
Jan 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1bb13224524862e5d3be4ac68c6377a4e54c9433 commit 1bb13224524862e5d3be4ac68c6377a4e54c9433 Author: henrika <henrika@chromium.org> Date: Fri Jan 13 17:10:38 2017 Increases default maximum number of audio input & output streams. The increase is from 16 to 32. BUG= 679215 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2632503004 Cr-Commit-Position: refs/heads/master@{#443589} [modify] https://crrev.com/1bb13224524862e5d3be4ac68c6377a4e54c9433/media/audio/audio_manager_base.cc
,
Jan 13 2017
,
Jan 13 2017
,
Mar 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a7682c8258c2e04621d791d60ba835f35b90cd1a commit a7682c8258c2e04621d791d60ba835f35b90cd1a Author: olka <olka@chromium.org> Date: Thu Mar 23 16:26:40 2017 Revert of Increases default maximum number of audio input & output streams (patchset #1 id:1 of https://codereview.chromium.org/2632503004/ ) Reason for revert: Speculative revert to identify the cause of Media.AudioRendererAudioGlitches. Should be relanded after we collect enough info to make a conclusion if this CL is a culprit or not. BUG=686689 Original issue's description: > Increases default maximum number of audio input & output streams. > The increase is from 16 to 32. > > BUG= 679215 > > CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel > > Review-Url: https://codereview.chromium.org/2632503004 > Cr-Commit-Position: refs/heads/master@{#443589} > Committed: https://chromium.googlesource.com/chromium/src/+/1bb13224524862e5d3be4ac68c6377a4e54c9433 TBR=tommi@chromium.org,henrika@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG= 679215 Review-Url: https://codereview.chromium.org/2772723003 Cr-Commit-Position: refs/heads/master@{#459110} [modify] https://crrev.com/a7682c8258c2e04621d791d60ba835f35b90cd1a/media/audio/audio_manager_base.cc |
||||
►
Sign in to add a comment |
||||
Comment 1 by tommi@chromium.org
, Jan 8 2017