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

Side by Side Diff: content/renderer/media/webrtc_audio_device_impl.cc

Issue 11232014: Move a bunch of code in content\renderer to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 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/media/webrtc_audio_device_impl.h" 5 #include "content/renderer/media/webrtc_audio_device_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
11 #include "content/renderer/media/audio_device_factory.h" 11 #include "content/renderer/media/audio_device_factory.h"
12 #include "content/renderer/media/audio_hardware.h" 12 #include "content/renderer/media/audio_hardware.h"
13 #include "content/renderer/render_thread_impl.h" 13 #include "content/renderer/render_thread_impl.h"
14 #include "media/audio/audio_parameters.h" 14 #include "media/audio/audio_parameters.h"
15 #include "media/audio/audio_util.h" 15 #include "media/audio/audio_util.h"
16 #include "media/audio/sample_rates.h" 16 #include "media/audio/sample_rates.h"
17 17
18 using content::AudioDeviceFactory;
19 using media::AudioParameters; 18 using media::AudioParameters;
20 using media::ChannelLayout; 19 using media::ChannelLayout;
21 20
21 namespace content {
22
22 static const int64 kMillisecondsBetweenProcessCalls = 5000; 23 static const int64 kMillisecondsBetweenProcessCalls = 5000;
23 static const double kMaxVolumeLevel = 255.0; 24 static const double kMaxVolumeLevel = 255.0;
24 25
25 // Supported hardware sample rates for input and output sides. 26 // Supported hardware sample rates for input and output sides.
26 #if defined(OS_WIN) || defined(OS_MACOSX) 27 #if defined(OS_WIN) || defined(OS_MACOSX)
27 // media::GetAudioInput[Output]HardwareSampleRate() asks the audio layer 28 // media::GetAudioInput[Output]HardwareSampleRate() asks the audio layer
28 // for its current sample rate (set by the user) on Windows and Mac OS X. 29 // for its current sample rate (set by the user) on Windows and Mac OS X.
29 // The listed rates below adds restrictions and WebRtcAudioDeviceImpl::Init() 30 // The listed rates below adds restrictions and WebRtcAudioDeviceImpl::Init()
30 // will fail if the user selects any rate outside these ranges. 31 // will fail if the user selects any rate outside these ranges.
31 static int kValidInputRates[] = {96000, 48000, 44100, 32000, 16000, 8000}; 32 static int kValidInputRates[] = {96000, 48000, 44100, 32000, 16000, 8000};
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1158 }
1158 1159
1159 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const { 1160 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const {
1160 NOTIMPLEMENTED(); 1161 NOTIMPLEMENTED();
1161 return -1; 1162 return -1;
1162 } 1163 }
1163 1164
1164 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) { 1165 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) {
1165 session_id_ = session_id; 1166 session_id_ = session_id;
1166 } 1167 }
1168
1169 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_device_impl.h ('k') | content/renderer/media/webrtc_audio_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698