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

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

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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_webkitplatformsupport_impl.h" 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { 625 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() {
626 RenderThreadImpl* thread = RenderThreadImpl::current(); 626 RenderThreadImpl* thread = RenderThreadImpl::current();
627 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); 627 return thread->GetAudioHardwareConfig()->GetOutputSampleRate();
628 } 628 }
629 629
630 size_t RendererWebKitPlatformSupportImpl::audioHardwareBufferSize() { 630 size_t RendererWebKitPlatformSupportImpl::audioHardwareBufferSize() {
631 RenderThreadImpl* thread = RenderThreadImpl::current(); 631 RenderThreadImpl* thread = RenderThreadImpl::current();
632 return thread->GetAudioHardwareConfig()->GetOutputBufferSize(); 632 return thread->GetAudioHardwareConfig()->GetOutputBufferSize();
633 } 633 }
634 634
635 unsigned RendererWebKitPlatformSupportImpl::audioHardwareOutputChannels() {
DaleCurtis 2013/03/07 02:41:39 Should this just be size_t?
Chris Rogers 2013/03/09 01:37:50 It's part of the WebKit API, so it has to match th
636 RenderThreadImpl* thread = RenderThreadImpl::current();
637 return thread->GetAudioHardwareConfig()->GetOutputChannels();
638 }
639
635 // TODO(crogers): remove deprecated API as soon as WebKit calls new API. 640 // TODO(crogers): remove deprecated API as soon as WebKit calls new API.
636 WebAudioDevice* 641 WebAudioDevice*
637 RendererWebKitPlatformSupportImpl::createAudioDevice( 642 RendererWebKitPlatformSupportImpl::createAudioDevice(
638 size_t buffer_size, 643 size_t buffer_size,
639 unsigned channels, 644 unsigned channels,
640 double sample_rate, 645 double sample_rate,
641 WebAudioDevice::RenderCallback* callback) { 646 WebAudioDevice::RenderCallback* callback) {
642 return createAudioDevice( 647 return createAudioDevice(
643 buffer_size, 0, channels, sample_rate, callback, "default"); 648 buffer_size, 0, channels, sample_rate, callback, "default");
644 } 649 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 //------------------------------------------------------------------------------ 854 //------------------------------------------------------------------------------
850 855
851 bool RendererWebKitPlatformSupportImpl::processMemorySizesInBytes( 856 bool RendererWebKitPlatformSupportImpl::processMemorySizesInBytes(
852 size_t* private_bytes, size_t* shared_bytes) { 857 size_t* private_bytes, size_t* shared_bytes) {
853 content::RenderThread::Get()->Send( 858 content::RenderThread::Get()->Send(
854 new ViewHostMsg_GetProcessMemorySizes(private_bytes, shared_bytes)); 859 new ViewHostMsg_GetProcessMemorySizes(private_bytes, shared_bytes));
855 return true; 860 return true;
856 } 861 }
857 862
858 } // namespace content 863 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698