Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Issue 155863003: Add basic support for "googDucking" to getUserMedia on Windows. (Closed)

Created:
6 years, 10 months ago by tommi (sloooow) - chröme
Modified:
6 years, 10 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, ajm
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add basic support for "googDucking" to getUserMedia on Windows. When enabled, this causes Chrome to open the default communication device instead of the "regular" default device (eConsole). At the moment this only works for the default device (i.e. when getUserMedia is called _without_ a sourceId constraint). But it is possible to implement this for other audio devices and I'll do so in a followup CL. While doing this I also fixed a few other things that I ran into: * Added support for the 'AudioParameters::DUCKING' effect in the WASAPI audio implementation. * Refactored WASAPIAudioInputStream: Removed HardwareSampleRate and HardwareChannelCount since they duplicate work and added GetInputStreamParameters instead. * Fixed AudioManager::GetInputStream to return format == linear AudioParameters on XP (previously it would always return 'low latency'). * Fixed AudioManager::GetInputStream to return a 10ms default buffer size for the low latency path instead of a fixed buffer size of 2048. * Fixed a race issue with how CoreAudio::IsSupported was being used. Also added documentation/warning about the implementation properties of that function. - This race has been causing tests to be flaky (for example the InputVolumeTest has been red for weeks on the Windows audio bot: http://build.chromium.org/p/chromium.gpu.fyi/waterfall?builder=Win7%20Audio). * Removed the InvalidPacketSize test since it doesn't make sense anymore. The code that InvalidPacketSize has been testing, has been gone for 6 weeks now and the Windows audio bot has been red that entire time. BUG=340377, 314654, 295751 TEST=Manually run the "WASAPIAudioInputStreamRecordToFile" test while playing out audio in another application (or a youtube clip). The playing audio should lower in volume while the test runs. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250844

Patch Set 1 #

Total comments: 17

Patch Set 2 : Initialize enumeration flag in constructor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -118 lines) Patch
M content/common/media/media_stream_options.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/media/media_stream_options.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_audio_processor_options.cc View 1 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_dependency_factory.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M media/audio/audio_parameters.h View 1 chunk +2 lines, -1 line 0 comments Download
M media/audio/win/audio_low_latency_input_win.h View 4 chunks +8 lines, -9 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win.cc View 6 chunks +41 lines, -20 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win_unittest.cc View 7 chunks +31 lines, -33 lines 0 comments Download
M media/audio/win/audio_low_latency_output_win_unittest.cc View 1 chunk +0 lines, -21 lines 0 comments Download
M media/audio/win/audio_manager_win.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M media/audio/win/audio_manager_win.cc View 1 11 chunks +22 lines, -32 lines 0 comments Download
M media/audio/win/core_audio_util_win.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
tommi (sloooow) - chröme
6 years, 10 months ago (2014-02-05 16:05:35 UTC) #1
tommi (sloooow) - chröme
+Andrew fyi
6 years, 10 months ago (2014-02-05 16:05:58 UTC) #2
henrika (OOO until Aug 14)
Lovely; almost perfect ;-) Have you tested it with some test page?
6 years, 10 months ago (2014-02-05 16:16:12 UTC) #3
henrika (OOO until Aug 14)
..seems like my comments were not included, hang on...
6 years, 10 months ago (2014-02-05 16:17:05 UTC) #4
henrika (OOO until Aug 14)
https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc#newcode265 media/audio/win/audio_low_latency_input_win.cc:265: int frames_per_buffer = sample_rate / 100; Have you been ...
6 years, 10 months ago (2014-02-05 16:19:00 UTC) #5
henrika (OOO until Aug 14)
LGTM
6 years, 10 months ago (2014-02-05 16:19:13 UTC) #6
no longer working on chromium
https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc#newcode265 media/audio/win/audio_low_latency_input_win.cc:265: int frames_per_buffer = sample_rate / 100; On 2014/02/05 16:19:01, ...
6 years, 10 months ago (2014-02-05 16:43:24 UTC) #7
henrika (OOO until Aug 14)
> BTW, should we change the native buffer size to 10ms as well on the ...
6 years, 10 months ago (2014-02-05 16:46:06 UTC) #8
no longer working on chromium
On 2014/02/05 16:46:06, henrika wrote: > > BTW, should we change the native buffer size ...
6 years, 10 months ago (2014-02-05 16:51:16 UTC) #9
henrika (OOO until Aug 14)
We use the default native timing interval given to us by the internal audio engine. ...
6 years, 10 months ago (2014-02-05 16:58:38 UTC) #10
no longer working on chromium
On 2014/02/05 16:58:38, henrika wrote: > We use the default native timing interval given to ...
6 years, 10 months ago (2014-02-05 20:27:59 UTC) #11
henrika (OOO until Aug 14)
Note that 10ms is in fact returned today in most cases also for output. The ...
6 years, 10 months ago (2014-02-05 21:31:40 UTC) #12
DaleCurtis
https://codereview.chromium.org/155863003/diff/1/content/common/media/media_stream_options.cc File content/common/media/media_stream_options.cc (right): https://codereview.chromium.org/155863003/diff/1/content/common/media/media_stream_options.cc#newcode22 content/common/media/media_stream_options.cc:22: const char kMediaStreamAudioDucking[] = "googDucking"; Is this a web ...
6 years, 10 months ago (2014-02-05 22:15:43 UTC) #13
no longer working on chromium
On 2014/02/05 21:31:40, henrika wrote: > Note that 10ms is in fact returned today in ...
6 years, 10 months ago (2014-02-06 09:02:55 UTC) #14
tommi (sloooow) - chröme
https://codereview.chromium.org/155863003/diff/1/content/common/media/media_stream_options.cc File content/common/media/media_stream_options.cc (right): https://codereview.chromium.org/155863003/diff/1/content/common/media/media_stream_options.cc#newcode22 content/common/media/media_stream_options.cc:22: const char kMediaStreamAudioDucking[] = "googDucking"; On 2014/02/05 22:15:43, DaleCurtis ...
6 years, 10 months ago (2014-02-06 11:50:33 UTC) #15
henrika (OOO until Aug 14)
https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc#newcode255 media/audio/win/audio_low_latency_input_win.cc:255: channel_layout = audio_engine_mix_format->nChannels == 1 ? Well, as Tommi ...
6 years, 10 months ago (2014-02-06 12:07:55 UTC) #16
tommi (sloooow) - chröme
https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc#newcode255 media/audio/win/audio_low_latency_input_win.cc:255: channel_layout = audio_engine_mix_format->nChannels == 1 ? On 2014/02/06 12:07:56, ...
6 years, 10 months ago (2014-02-06 12:55:33 UTC) #17
henrika (OOO until Aug 14)
https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc#newcode255 media/audio/win/audio_low_latency_input_win.cc:255: channel_layout = audio_engine_mix_format->nChannels == 1 ? Hope I am ...
6 years, 10 months ago (2014-02-06 13:11:28 UTC) #18
tommi (sloooow) - chröme
https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc File media/audio/win/audio_low_latency_input_win.cc (right): https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_low_latency_input_win.cc#newcode255 media/audio/win/audio_low_latency_input_win.cc:255: channel_layout = audio_engine_mix_format->nChannels == 1 ? On 2014/02/06 13:11:28, ...
6 years, 10 months ago (2014-02-06 13:28:33 UTC) #19
DaleCurtis
https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_manager_win.cc File media/audio/win/audio_manager_win.cc (right): https://codereview.chromium.org/155863003/diff/1/media/audio/win/audio_manager_win.cc#newcode137 media/audio/win/audio_manager_win.cc:137: core_audio_supported_(CoreAudioUtil::IsSupported()) { On 2014/02/06 13:11:28, henrika wrote: > Link ...
6 years, 10 months ago (2014-02-06 19:09:20 UTC) #20
DaleCurtis
https://codereview.chromium.org/155863003/diff/1/content/common/media/media_stream_options.cc File content/common/media/media_stream_options.cc (right): https://codereview.chromium.org/155863003/diff/1/content/common/media/media_stream_options.cc#newcode22 content/common/media/media_stream_options.cc:22: const char kMediaStreamAudioDucking[] = "googDucking"; On 2014/02/06 11:50:34, tommi ...
6 years, 10 months ago (2014-02-06 19:19:58 UTC) #21
tommi (sloooow) - chröme
Thanks for making the enumeration changes. With that I'm pretty confident Chrome won't have this ...
6 years, 10 months ago (2014-02-06 20:37:04 UTC) #22
tommi (sloooow) - chröme
> Thanks for making the enumeration changes. With that I'm pretty confident > Chrome won't ...
6 years, 10 months ago (2014-02-12 10:26:56 UTC) #23
tommi (sloooow) - chröme
I'm going to clean up the cl and back out a few changes. Will ping ...
6 years, 10 months ago (2014-02-12 10:28:15 UTC) #24
tommi (sloooow) - chröme
PTAL. The "intent bug" turned out to be a pebkac. My test profile was set ...
6 years, 10 months ago (2014-02-12 16:04:57 UTC) #25
DaleCurtis
I think we should still move the initialization off the UI thread, but since we ...
6 years, 10 months ago (2014-02-12 19:06:46 UTC) #26
tommi (sloooow) - chröme
On 2014/02/12 19:06:46, DaleCurtis wrote: > I think we should still move the initialization off ...
6 years, 10 months ago (2014-02-12 19:13:18 UTC) #27
tommi (sloooow) - chröme
Initialize enumeration flag in constructor
6 years, 10 months ago (2014-02-12 19:53:42 UTC) #28
tommi (sloooow) - chröme
The CQ bit was checked by tommi@chromium.org
6 years, 10 months ago (2014-02-12 19:56:24 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommi@chromium.org/155863003/400001
6 years, 10 months ago (2014-02-12 19:59:03 UTC) #30
commit-bot: I haz the power
6 years, 10 months ago (2014-02-12 23:38:53 UTC) #31
Message was sent while issue was closed.
Change committed as 250844

Powered by Google App Engine
This is Rietveld 408576698