MediaStreamAudio: Revisit audio frames_per_buffer calculations. |
||||||||
Issue descriptionIn content::ProcessedLocalAudioSource there is a GetBufferSize() method that determines a default buffer size when one is not provided in the StreamDeviceInfo. There are two issues needing to be re-visited: 1. Should the StreamDeviceInfo be required to always provide a valid buffer size? Answering this question would involve tracing the calling code paths to confirm where a buffer size might not be getting set. If the buffer size is always being set, then great: Just let media::AudioParameters do its validity check with the given frames_per_buffer value, and delete all the fallback-code. 2. Why is Android special? Meaning, why is it being forced to 20 ms, when all other platforms use either the hardware device's default (or 10 ms as a fallback)? Can we just remove the special "#if defined(OS_ANDROID)" section?
,
Aug 16 2016
Thank youhoaw do i debug my phone
,
Aug 16 2016
Regarding Android: it was a very long time since those parts were written but as I recall it we had to go for a larger buffer size than 10 to make it work back then. My guess is that you could here glitches on some devices using 10 and that 20 helped. I don't know how essential this assumption is today since the Android audio layer has changed so much since the initial implementation in Chrome. My recommendation is to: try to remove special parts for Android and use same approach as on other OS:es. Only use special cases if still really needed.
,
Aug 16 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249 commit 81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249 Author: miu <miu@chromium.org> Date: Tue Aug 16 20:59:18 2016 Use LocalMediaStreamAudioSource for screen-casting use cases. Adds a new MediaStreamAudioSource implementation for taking input from a local source, and passing it directly to sinks without going through the WebRTC MediaStreamAudioProcessor. This new implementation will be used by the screen casting use cases (e.g., tab or desktop audio capture). Before this change, even if the MediaStreamAudioProcessor was disabled, a rather large graph of objects, extra threads (for libjingle), and additional audio buffers were being created; with audio being copied into and out of the buffers; even though no processing was being done. BUG= 577881 ,638081 Review-Url: https://codereview.chromium.org/2219933003 Cr-Commit-Position: refs/heads/master@{#412333} [modify] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/content_renderer.gypi [modify] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/public/common/media_stream_request.cc [modify] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/public/common/media_stream_request.h [add] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/renderer/media/local_media_stream_audio_source.cc [add] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/renderer/media/local_media_stream_audio_source.h [modify] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/renderer/media/media_stream_audio_processor.cc [modify] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/renderer/media/media_stream_audio_processor.h [modify] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/renderer/media/user_media_client_impl.cc [modify] https://crrev.com/81c7ecbbe69b2be50bf2a6a30b4e88d72b09e249/content/renderer/media/webrtc/processed_local_audio_source.cc
,
Jun 26 2017
[Re-triage] This seems to be still valid. Does anyone feel like picking it up, or know the answer to question 1 in the original report?
,
Jun 26 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 28 2018
Henrik, do you think we should close this one?
,
Jun 28 2018
Don't know the details well enough to comment given all changes that are done in this area. Asking olka@ for confirmation instead.
,
Jun 28 2018
That code seems to be mostly unchanged, including Android-specific part.
,
Jun 28 2018
,
Sep 5
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by olka@chromium.org
, Aug 16 2016