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

Issue 10636036: Enable renderer side mixing behind a flag. (Closed)

Created:
8 years, 6 months ago by DaleCurtis
Modified:
8 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jochen+watch-content_chromium.org, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Enable renderer side mixing behind a flag. Lands the final bits required to turn on renderer side mixing behind a flag! Switching <audio> over to the PCM_LOW_LATENCY track to boot. Specifically the flag is --enable-renderer-side-mixing. The big picture: RenderThreadImpl owns an AudioRendererMixerManager which RenderAudioSourceProvider uses to create AudioRenderMixerInput, which extensions of AudioRendererSink. When ARMM creates ARMI it passes in callbacks which allow ARMI to retrieve an AudioRendererMixer from ARMM once ARMI::Initialize() has been called. When ARMM gets a request for an ARM from ARMI::Initialize() it will first check if one exists and if so, hand out a reference. If not, it will create a new ARM instance (which it owns) and initialize it with the proper hardware output AudioParameters and an AudioDevice based AudioRenderSink. ARM will immediately call Initialize() and Start() on AudioDevice which will then begin requesting data via RenderCallback from ARM. If the hardware sampling rate is not equal to the input sampling rate, ARM will instantiate a MultiChannelResampler instance to resample the audio as required for use by a PCM_LOW_LATENCY AudioDevice. After ARMI::Initialize() nothing really happens until RASP() eventually calls ARMI::Start() which will then register the ARMI instance with ARM. At which point ARM will start mixing it into the output stream it's providing to AudioDevice. Everything works as far as I can tell, but an optimization pass and more careful testing is necessary on Windows before the feature comes out from behind the flag. BUG=133637 TEST=New unit tests. Manual testing. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146935

Patch Set 1 : Renderer Side Mixing! #

Total comments: 35

Patch Set 2 : Comments! #

Total comments: 13

Patch Set 3 : Mo' comments! #

Patch Set 4 : Rebase. Fix old name. #

Patch Set 5 : Add virtual GetAudioHardwareParameters() method. #

Total comments: 2

Patch Set 6 : Audio Hardware Config Changes. #

Patch Set 7 : Remove new mixer address != old mixer address test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+330 lines, -5 lines) Patch
M content/browser/renderer_host/render_process_host_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A content/renderer/media/audio_renderer_mixer_manager.h View 1 2 3 4 5 1 chunk +79 lines, -0 lines 0 comments Download
A content/renderer/media/audio_renderer_mixer_manager.cc View 1 2 3 4 5 1 chunk +73 lines, -0 lines 0 comments Download
A content/renderer/media/audio_renderer_mixer_manager_unittest.cc View 1 2 3 4 5 6 1 chunk +131 lines, -0 lines 0 comments Download
M content/renderer/media/render_audiosourceprovider.cc View 1 2 3 4 5 2 chunks +17 lines, -5 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 3 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 3 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
DaleCurtis
scherkus: please review everything. jam: non-media content/ changes. Alternatively, please suggest a different reviewer. Thanks!
8 years, 5 months ago (2012-07-13 01:24:44 UTC) #1
jochen (gone - plz use gerrit)
drive-by content comments https://chromiumcodereview.appspot.com/10636036/diff/3010/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://chromiumcodereview.appspot.com/10636036/diff/3010/content/renderer/media/audio_renderer_mixer_manager.cc#newcode14 content/renderer/media/audio_renderer_mixer_manager.cc:14: using content::AudioDeviceFactory; after you've moved the ...
8 years, 5 months ago (2012-07-13 08:51:03 UTC) #2
jam
my parents lgtm with nit, and after Jochen's comments are addressed http://codereview.chromium.org/10636036/diff/3010/content/renderer/render_thread_impl.h File content/renderer/render_thread_impl.h (right): ...
8 years, 5 months ago (2012-07-13 15:19:42 UTC) #3
jam
my parents lgtm with nit, and after Jochen's comments are addressed
8 years, 5 months ago (2012-07-13 15:19:42 UTC) #4
jam
On 2012/07/13 15:19:42, John Abd-El-Malek wrote: > my parents lgtm with nit, and after Jochen's ...
8 years, 5 months ago (2012-07-13 15:35:31 UTC) #5
DaleCurtis
On 2012/07/13 15:35:31, John Abd-El-Malek wrote: > On 2012/07/13 15:19:42, John Abd-El-Malek wrote: > > ...
8 years, 5 months ago (2012-07-13 18:00:53 UTC) #6
scherkus (not reviewing)
https://chromiumcodereview.appspot.com/10636036/diff/3010/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://chromiumcodereview.appspot.com/10636036/diff/3010/content/renderer/media/audio_renderer_mixer_manager.cc#newcode17 content/renderer/media/audio_renderer_mixer_manager.cc:17: // DCHECK something static? wha? https://chromiumcodereview.appspot.com/10636036/diff/3010/content/renderer/media/audio_renderer_mixer_manager.cc#newcode20 content/renderer/media/audio_renderer_mixer_manager.cc:20: AudioRendererMixerManager::~AudioRendererMixerManager() {} ...
8 years, 5 months ago (2012-07-13 18:40:15 UTC) #7
jam
On 2012/07/13 18:00:53, DaleCurtis wrote: > On 2012/07/13 15:35:31, John Abd-El-Malek wrote: > > On ...
8 years, 5 months ago (2012-07-13 19:41:11 UTC) #8
DaleCurtis
Just to avoid a member variable in RenderThread; I'll keep the current design then. All ...
8 years, 5 months ago (2012-07-13 21:28:33 UTC) #9
scherkus (not reviewing)
LGTM w/ nits Ddon't forget to update CL description in case anything changed. For example ...
8 years, 5 months ago (2012-07-13 23:17:38 UTC) #10
DaleCurtis
Done. scherkus: Still need you to finish reviewing http://codereview.chromium.org/10698066/ before this can land :) jochen: ...
8 years, 5 months ago (2012-07-14 00:39:26 UTC) #11
DaleCurtis
On 2012/07/14 00:39:26, DaleCurtis wrote: > Done. > > scherkus: Still need you to finish ...
8 years, 5 months ago (2012-07-16 17:55:52 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/10636036/25003
8 years, 5 months ago (2012-07-16 17:56:03 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/10636036/28007
8 years, 5 months ago (2012-07-16 18:18:25 UTC) #14
DaleCurtis
scherkus: PTAL. The GetAudioHardware*() methods weren't working properly on bots w/o audio hardware. I've added ...
8 years, 5 months ago (2012-07-16 20:22:35 UTC) #15
scherkus (not reviewing)
http://codereview.chromium.org/10636036/diff/17017/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): http://codereview.chromium.org/10636036/diff/17017/content/renderer/media/audio_renderer_mixer_manager.cc#newcode36 content/renderer/media/audio_renderer_mixer_manager.cc:36: media::GetAudioHardwareBufferSize()); Two things: - This is kinda ugly - ...
8 years, 5 months ago (2012-07-16 20:52:58 UTC) #16
DaleCurtis
http://codereview.chromium.org/10636036/diff/17017/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): http://codereview.chromium.org/10636036/diff/17017/content/renderer/media/audio_renderer_mixer_manager.cc#newcode36 content/renderer/media/audio_renderer_mixer_manager.cc:36: media::GetAudioHardwareBufferSize()); On 2012/07/16 20:52:59, scherkus wrote: > Two things: ...
8 years, 5 months ago (2012-07-16 22:25:59 UTC) #17
scherkus (not reviewing)
lgtm!
8 years, 5 months ago (2012-07-16 22:32:55 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/10636036/28013
8 years, 5 months ago (2012-07-16 22:35:07 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/10636036/17019
8 years, 5 months ago (2012-07-16 23:15:44 UTC) #20
commit-bot: I haz the power
8 years, 5 months ago (2012-07-17 00:25:43 UTC) #21
Change committed as 146935

Powered by Google App Engine
This is Rietveld 408576698