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

Issue 2750543003: Support AudioContextOptions latencyHint as double. (Closed)

Created:
3 years, 9 months ago by Andrew MacPherson
Modified:
3 years, 8 months ago
CC:
blink-reviews, chromium-reviews, darin-cc_chromium.org, einbinder+watch-test-runner_chromium.org, feature-media-reviews_chromium.org, haraken, jam, jochen+watch_chromium.org, kinuko+watch, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo, posciak+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Support AudioContextOptions latencyHint as double. Follow-up to https://codereview.chromium.org/2501863003 This adds support for the latencyHint value to be passed as a double in order to request an exact latency amount. BUG=564276 R=rtoy@chromium.org Review-Url: https://codereview.chromium.org/2750543003 Cr-Commit-Position: refs/heads/master@{#464988} Committed: https://chromium.googlesource.com/chromium/src/+/67c41de111691e8cfb173c6cb1f31ee1d24b5dfe

Patch Set 1 #

Total comments: 18

Patch Set 2 : Fixes based on reviewer comments. #

Total comments: 12

Patch Set 3 : More updates based on reviewer feedback. #

Total comments: 1

Patch Set 4 : Round latencyHint bufsize to multiple of hw size. #

Patch Set 5 : Fix audiocontextoptions LayoutTest. #

Total comments: 6

Patch Set 6 : More updates based on reviewer comments. #

Total comments: 10

Patch Set 7 : Fix buffer size calculations based on feedback. #

Total comments: 5

Patch Set 8 : Undo "power of 2" change, fix method params. #

Patch Set 9 : No max value clamping in AudioLatency. #

Total comments: 2

Patch Set 10 : Update TODO with userid and crbug. #

Total comments: 18

Patch Set 11 : Fixes based on reviewer comments. #

Patch Set 12 : Add comments on latencyHint as double value. #

Patch Set 13 : Rebase after Blink rename. #

Patch Set 14 : Update baseLatency to equal HW latency. #

Total comments: 8

Patch Set 15 : Refactor audiocontextoptions LayoutTest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -81 lines) Patch
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -1 line 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/renderer_webaudiodevice_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +37 lines, -27 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/shell/renderer/layout_test/layout_test_content_renderer_client.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/shell/renderer/layout_test/layout_test_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +32 lines, -2 lines 0 comments Download
M media/base/audio_latency.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M media/base/audio_latency.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +112 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioContextOptions.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioContextTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +40 lines, -3 lines 0 comments Download

Messages

Total messages: 71 (16 generated)
Andrew MacPherson
Hi rtoy@ and olka@, This is the initial CL for the latencyHint "exact" type, I'm ...
3 years, 9 months ago (2017-03-14 12:03:03 UTC) #2
hongchan
https://codereview.chromium.org/2750543003/diff/1/third_party/WebKit/Source/platform/audio/AudioDestination.cpp File third_party/WebKit/Source/platform/audio/AudioDestination.cpp (right): https://codereview.chromium.org/2750543003/diff/1/third_party/WebKit/Source/platform/audio/AudioDestination.cpp#newcode85 third_party/WebKit/Source/platform/audio/AudioDestination.cpp:85: m_callbackBufferSize = m_webAudioDevice->framesPerBuffer(); On 2017/03/14 12:03:03, Andrew MacPherson wrote: ...
3 years, 9 months ago (2017-03-14 14:36:34 UTC) #4
Raymond Toy
Thanks for working on this! https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc#newcode71 content/renderer/media/audio_renderer_mixer_manager.cc:71: hardware_params.frames_per_buffer()); Blink has a ...
3 years, 9 months ago (2017-03-14 15:19:39 UTC) #5
Raymond Toy
On 2017/03/14 12:03:03, Andrew MacPherson wrote: > Hi rtoy@ and olka@, > > This is ...
3 years, 9 months ago (2017-03-14 15:26:49 UTC) #6
o1ka
https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc#newcode68 content/renderer/media/audio_renderer_mixer_manager.cc:68: media::AudioLatency::GetHighLatencyBufferSize( HighLatencyBufferSize is 20 ms. Is it the the ...
3 years, 9 months ago (2017-03-14 15:55:43 UTC) #7
o1ka
On 2017/03/14 15:26:49, Raymond Toy wrote: > On 2017/03/14 12:03:03, Andrew MacPherson wrote: > > ...
3 years, 9 months ago (2017-03-14 15:59:53 UTC) #8
Raymond Toy
https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc#newcode68 content/renderer/media/audio_renderer_mixer_manager.cc:68: media::AudioLatency::GetHighLatencyBufferSize( On 2017/03/14 15:55:43, o1ka wrote: > HighLatencyBufferSize is ...
3 years, 9 months ago (2017-03-14 16:14:35 UTC) #9
o1ka
On 2017/03/14 16:14:35, Raymond Toy wrote: > https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc > File content/renderer/media/audio_renderer_mixer_manager.cc (right): > > https://codereview.chromium.org/2750543003/diff/1/content/renderer/media/audio_renderer_mixer_manager.cc#newcode68 ...
3 years, 9 months ago (2017-03-14 16:25:29 UTC) #10
Raymond Toy
On 2017/03/14 16:25:29, o1ka wrote: > On 2017/03/14 16:14:35, Raymond Toy wrote: > > > ...
3 years, 9 months ago (2017-03-14 17:03:30 UTC) #11
Andrew MacPherson
Thanks for taking a look olka, rtoy and hongchan! On 2017/03/14 at 15:59:53, olka wrote: ...
3 years, 9 months ago (2017-03-15 15:08:18 UTC) #12
o1ka
>>For the 'playback' upper bound this can certainly be higher but I wasn't sure >>how ...
3 years, 9 months ago (2017-03-16 10:51:24 UTC) #13
Andrew MacPherson
Thanks olka! https://codereview.chromium.org/2750543003/diff/20001/content/renderer/media/renderer_webaudiodevice_impl.cc File content/renderer/media/renderer_webaudiodevice_impl.cc (right): https://codereview.chromium.org/2750543003/diff/20001/content/renderer/media/renderer_webaudiodevice_impl.cc#newcode109 content/renderer/media/renderer_webaudiodevice_impl.cc:109: int output_buffer_size = 0; On 2017/03/16 at ...
3 years, 9 months ago (2017-03-16 17:02:09 UTC) #14
o1ka
dalecurtis@: Is it ok for each of the supported platforms if AudioOutputDevice is configured with ...
3 years, 9 months ago (2017-03-17 11:17:22 UTC) #16
Andrew MacPherson
Friendly ping for dalecurtis@ re: olka@'s questions around testing for different audio buffer sizes, and ...
3 years, 9 months ago (2017-03-22 12:27:57 UTC) #17
DaleCurtis
When we originally discussed this proposal it was my understanding that the latency hint is ...
3 years, 9 months ago (2017-03-22 17:57:49 UTC) #19
Raymond Toy
On 2017/03/22 17:57:49, DaleCurtis wrote: > When we originally discussed this proposal it was my ...
3 years, 9 months ago (2017-03-22 21:49:07 UTC) #20
Andrew MacPherson
On 2017/03/22 at 21:49:07, rtoy wrote: > On 2017/03/22 17:57:49, DaleCurtis wrote: > > When ...
3 years, 9 months ago (2017-03-26 09:52:55 UTC) #21
DaleCurtis
The nearest fixed multiple of the hardware buffer size should be sufficient in all cases ...
3 years, 9 months ago (2017-03-27 18:52:30 UTC) #22
Andrew MacPherson
On 2017/03/27 at 18:52:30, dalecurtis wrote: > The nearest fixed multiple of the hardware buffer ...
3 years, 8 months ago (2017-03-28 13:39:26 UTC) #23
DaleCurtis
https://codereview.chromium.org/2750543003/diff/80001/content/renderer/media/renderer_webaudiodevice_impl.cc File content/renderer/media/renderer_webaudiodevice_impl.cc (right): https://codereview.chromium.org/2750543003/diff/80001/content/renderer/media/renderer_webaudiodevice_impl.cc#newcode64 content/renderer/media/renderer_webaudiodevice_impl.cc:64: return media::AudioLatency::GetHighLatencyBufferSize( I wonder if we should just replace ...
3 years, 8 months ago (2017-03-28 17:34:08 UTC) #24
Andrew MacPherson
Thanks dalecurtis@! https://codereview.chromium.org/2750543003/diff/80001/content/renderer/media/renderer_webaudiodevice_impl.cc File content/renderer/media/renderer_webaudiodevice_impl.cc (right): https://codereview.chromium.org/2750543003/diff/80001/content/renderer/media/renderer_webaudiodevice_impl.cc#newcode64 content/renderer/media/renderer_webaudiodevice_impl.cc:64: return media::AudioLatency::GetHighLatencyBufferSize( On 2017/03/28 at 17:34:07, DaleCurtis ...
3 years, 8 months ago (2017-03-29 08:34:10 UTC) #25
o1ka
https://codereview.chromium.org/2750543003/diff/100001/media/base/audio_latency.cc File media/base/audio_latency.cc (right): https://codereview.chromium.org/2750543003/diff/100001/media/base/audio_latency.cc#newcode139 media/base/audio_latency.cc:139: hardware_buffer_size; It's actually not the nearest multiply (round), but ...
3 years, 8 months ago (2017-03-29 10:56:05 UTC) #26
Raymond Toy
On 2017/03/29 08:34:10, Andrew MacPherson wrote: > Thanks dalecurtis@! > > https://codereview.chromium.org/2750543003/diff/80001/content/renderer/media/renderer_webaudiodevice_impl.cc > File content/renderer/media/renderer_webaudiodevice_impl.cc ...
3 years, 8 months ago (2017-03-29 16:18:29 UTC) #27
DaleCurtis
https://codereview.chromium.org/2750543003/diff/100001/media/base/audio_latency.cc File media/base/audio_latency.cc (right): https://codereview.chromium.org/2750543003/diff/100001/media/base/audio_latency.cc#newcode143 media/base/audio_latency.cc:143: std::ceil(twenty_ms_size / hardware_buffer_size) * hardware_buffer_size; On 2017/03/29 at 10:56:05, ...
3 years, 8 months ago (2017-03-29 22:42:42 UTC) #28
Andrew MacPherson
Thanks rtoy@, olka@ and dalecurtis@! On 2017/03/29 at 16:18:29, rtoy wrote: > Question. Say I ...
3 years, 8 months ago (2017-03-30 08:07:18 UTC) #29
DaleCurtis
https://codereview.chromium.org/2750543003/diff/100001/media/base/audio_latency.cc File media/base/audio_latency.cc (right): https://codereview.chromium.org/2750543003/diff/100001/media/base/audio_latency.cc#newcode143 media/base/audio_latency.cc:143: std::ceil(twenty_ms_size / hardware_buffer_size) * hardware_buffer_size; On 2017/03/30 at 08:07:18, ...
3 years, 8 months ago (2017-03-30 18:53:47 UTC) #30
Andrew MacPherson
On 2017/03/30 at 18:53:47, dalecurtis wrote: > > Sorry, my mistake here. I can remove ...
3 years, 8 months ago (2017-03-31 12:31:01 UTC) #31
DaleCurtis
On 2017/03/31 at 12:31:01, andrew.macpherson wrote: > Clamping the buffer size either here or in ...
3 years, 8 months ago (2017-03-31 19:46:39 UTC) #32
Andrew MacPherson
On 2017/03/31 at 19:46:39, dalecurtis wrote: > On 2017/03/31 at 12:31:01, andrew.macpherson wrote: > > ...
3 years, 8 months ago (2017-04-03 09:49:00 UTC) #33
DaleCurtis
On 2017/04/03 at 09:49:00, andrew.macpherson wrote: > On 2017/03/31 at 19:46:39, dalecurtis wrote: > > ...
3 years, 8 months ago (2017-04-03 22:33:23 UTC) #34
Andrew MacPherson
On 2017/04/03 at 22:33:23, dalecurtis wrote: > I must be missing something, sorry :) It ...
3 years, 8 months ago (2017-04-04 12:18:25 UTC) #35
DaleCurtis
On 2017/04/04 at 12:18:25, andrew.macpherson wrote: > On 2017/04/03 at 22:33:23, dalecurtis wrote: > > ...
3 years, 8 months ago (2017-04-04 16:56:47 UTC) #36
Andrew MacPherson
On 2017/04/04 at 16:56:47, dalecurtis wrote: > On 2017/04/04 at 12:18:25, andrew.macpherson wrote: > > ...
3 years, 8 months ago (2017-04-05 07:36:23 UTC) #37
DaleCurtis
audio latency stuff lgtm, defer to rtoy and olka for rest. https://codereview.chromium.org/2750543003/diff/160001/content/renderer/media/renderer_webaudiodevice_impl.cc File content/renderer/media/renderer_webaudiodevice_impl.cc (right): ...
3 years, 8 months ago (2017-04-05 23:12:07 UTC) #39
Andrew MacPherson
Thanks dalecurtis@! https://codereview.chromium.org/2750543003/diff/160001/content/renderer/media/renderer_webaudiodevice_impl.cc File content/renderer/media/renderer_webaudiodevice_impl.cc (right): https://codereview.chromium.org/2750543003/diff/160001/content/renderer/media/renderer_webaudiodevice_impl.cc#newcode68 content/renderer/media/renderer_webaudiodevice_impl.cc:68: // TODO: replace 4096 with the OS-specific ...
3 years, 8 months ago (2017-04-06 07:06:06 UTC) #40
o1ka
lgtm % nits. Thanks Andrew! (Except third_party/WebKit/* I'm unfamiliar with) https://codereview.chromium.org/2750543003/diff/180001/content/renderer/media/renderer_webaudiodevice_impl.cc File content/renderer/media/renderer_webaudiodevice_impl.cc (right): https://codereview.chromium.org/2750543003/diff/180001/content/renderer/media/renderer_webaudiodevice_impl.cc#newcode51 ...
3 years, 8 months ago (2017-04-06 16:02:30 UTC) #41
Raymond Toy
Almost there; just a few questions on the tests. https://codereview.chromium.org/2750543003/diff/180001/third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html File third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html (right): https://codereview.chromium.org/2750543003/diff/180001/third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html#newcode33 third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html:33: ...
3 years, 8 months ago (2017-04-06 17:32:00 UTC) #42
Andrew MacPherson
Thanks olka@ and rtoy@! https://codereview.chromium.org/2750543003/diff/180001/content/renderer/media/renderer_webaudiodevice_impl.cc File content/renderer/media/renderer_webaudiodevice_impl.cc (right): https://codereview.chromium.org/2750543003/diff/180001/content/renderer/media/renderer_webaudiodevice_impl.cc#newcode51 content/renderer/media/renderer_webaudiodevice_impl.cc:51: const media::AudioLatency::LatencyType latency, On 2017/04/06 ...
3 years, 8 months ago (2017-04-07 06:59:03 UTC) #43
Raymond Toy
3 years, 8 months ago (2017-04-07 15:04:45 UTC) #44
Raymond Toy
The WebAudio parts look great. But I think I've forgotten what latencyHint = value actually ...
3 years, 8 months ago (2017-04-07 15:12:14 UTC) #45
Andrew MacPherson
On 2017/04/07 at 15:12:14, rtoy wrote: > The WebAudio parts look great. > > But ...
3 years, 8 months ago (2017-04-09 09:59:50 UTC) #46
Raymond Toy
On 2017/04/09 09:59:50, Andrew MacPherson wrote: > On 2017/04/07 at 15:12:14, rtoy wrote: > > ...
3 years, 8 months ago (2017-04-10 15:21:19 UTC) #47
hongchan
On 2017/04/10 15:21:19, Raymond Toy wrote: > On 2017/04/09 09:59:50, Andrew MacPherson wrote: > > ...
3 years, 8 months ago (2017-04-10 16:40:05 UTC) #48
Andrew MacPherson
On 2017/04/10 at 16:40:05, hongchan wrote: > On 2017/04/10 15:21:19, Raymond Toy wrote: > > ...
3 years, 8 months ago (2017-04-11 09:38:26 UTC) #49
Raymond Toy
On 2017/04/11 09:38:26, Andrew MacPherson wrote: > On 2017/04/10 at 16:40:05, hongchan wrote: > > ...
3 years, 8 months ago (2017-04-11 14:54:47 UTC) #50
hongchan
WebAudio lgtm with nits on layout test. Sorry for being absent in the review and ...
3 years, 8 months ago (2017-04-11 17:27:37 UTC) #51
hongchan
On 2017/04/11 14:54:47, Raymond Toy wrote: > On 2017/04/11 09:38:26, Andrew MacPherson wrote: > > ...
3 years, 8 months ago (2017-04-11 17:29:11 UTC) #52
Andrew MacPherson
Great, thanks hongchan! https://codereview.chromium.org/2750543003/diff/260001/third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html File third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html (right): https://codereview.chromium.org/2750543003/diff/260001/third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html#newcode7 third_party/WebKit/LayoutTests/webaudio/audiocontextoptions.html:7: <script src="resources/audio-testing.js"></script> On 2017/04/11 at 17:27:37, ...
3 years, 8 months ago (2017-04-12 12:43:41 UTC) #53
hongchan
lgtm. The layout test looks great. Thanks, Andrew!
3 years, 8 months ago (2017-04-14 16:44:44 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2750543003/280001
3 years, 8 months ago (2017-04-14 17:42:05 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/411631)
3 years, 8 months ago (2017-04-14 17:52:31 UTC) #63
Andrew MacPherson
Hi dgozman@, would you be able to take a quick look at these files from ...
3 years, 8 months ago (2017-04-15 08:46:32 UTC) #65
dgozman
content lgtm
3 years, 8 months ago (2017-04-17 17:09:05 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2750543003/280001
3 years, 8 months ago (2017-04-17 17:55:47 UTC) #68
commit-bot: I haz the power
3 years, 8 months ago (2017-04-17 19:45:48 UTC) #71
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/67c41de111691e8cfb173c6cb1f3...

Powered by Google App Engine
This is Rietveld 408576698