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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 2750543003: Support AudioContextOptions latencyHint as double. (Closed)
Patch Set: Update TODO with userid and crbug. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 668
669 WebAudioDevice* RendererBlinkPlatformImpl::createAudioDevice( 669 WebAudioDevice* RendererBlinkPlatformImpl::createAudioDevice(
670 unsigned input_channels, 670 unsigned input_channels,
671 unsigned channels, 671 unsigned channels,
672 const blink::WebAudioLatencyHint& latency_hint, 672 const blink::WebAudioLatencyHint& latency_hint,
673 WebAudioDevice::RenderCallback* callback, 673 WebAudioDevice::RenderCallback* callback,
674 const blink::WebString& input_device_id, 674 const blink::WebString& input_device_id,
675 const blink::WebSecurityOrigin& security_origin) { 675 const blink::WebSecurityOrigin& security_origin) {
676 // Use a mock for testing. 676 // Use a mock for testing.
677 blink::WebAudioDevice* mock_device = 677 blink::WebAudioDevice* mock_device =
678 GetContentClient()->renderer()->OverrideCreateAudioDevice(); 678 GetContentClient()->renderer()->OverrideCreateAudioDevice(latency_hint);
679 if (mock_device) 679 if (mock_device)
680 return mock_device; 680 return mock_device;
681 681
682 // The |channels| does not exactly identify the channel layout of the 682 // The |channels| does not exactly identify the channel layout of the
683 // device. The switch statement below assigns a best guess to the channel 683 // device. The switch statement below assigns a best guess to the channel
684 // layout based on number of channels. 684 // layout based on number of channels.
685 media::ChannelLayout layout = media::GuessChannelLayout(channels); 685 media::ChannelLayout layout = media::GuessChannelLayout(channels);
686 if (layout == media::CHANNEL_LAYOUT_UNSUPPORTED) 686 if (layout == media::CHANNEL_LAYOUT_UNSUPPORTED)
687 layout = media::CHANNEL_LAYOUT_DISCRETE; 687 layout = media::CHANNEL_LAYOUT_DISCRETE;
688 688
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 //------------------------------------------------------------------------------ 1273 //------------------------------------------------------------------------------
1274 void RendererBlinkPlatformImpl::requestPurgeMemory() { 1274 void RendererBlinkPlatformImpl::requestPurgeMemory() {
1275 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but 1275 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but
1276 // ChildMemoryCoordinator isn't always available as it's only initialized 1276 // ChildMemoryCoordinator isn't always available as it's only initialized
1277 // when kMemoryCoordinatorV0 is enabled. 1277 // when kMemoryCoordinatorV0 is enabled.
1278 // Use ChildMemoryCoordinator when memory coordinator is always enabled. 1278 // Use ChildMemoryCoordinator when memory coordinator is always enabled.
1279 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); 1279 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
1280 } 1280 }
1281 1281
1282 } // namespace content 1282 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698