OLD | NEW |
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/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 #include "content/renderer/media/audio_hardware.h" | 10 #include "content/renderer/media/audio_hardware.h" |
11 #include "content/renderer/render_thread_impl.h" | 11 #include "content/renderer/render_thread_impl.h" |
12 #include "media/audio/audio_util.h" | 12 #include "media/audio/audio_util.h" |
13 | 13 |
| 14 using media::AudioParameters; |
| 15 |
14 static const int64 kMillisecondsBetweenProcessCalls = 5000; | 16 static const int64 kMillisecondsBetweenProcessCalls = 5000; |
15 | 17 |
16 // Supported hardware sample rates for input and output sides. | 18 // Supported hardware sample rates for input and output sides. |
17 #if defined(OS_WIN) || defined(OS_MACOSX) | 19 #if defined(OS_WIN) || defined(OS_MACOSX) |
18 // media::GetAudioInput[Output]HardwareSampleRate() asks the audio layer | 20 // media::GetAudioInput[Output]HardwareSampleRate() asks the audio layer |
19 // for its current sample rate (set by the user) on Windows and Mac OS X. | 21 // for its current sample rate (set by the user) on Windows and Mac OS X. |
20 // The listed rates below adds restrictions and WebRtcAudioDeviceImpl::Init() | 22 // The listed rates below adds restrictions and WebRtcAudioDeviceImpl::Init() |
21 // will fail if the user selects any rate outside these ranges. | 23 // will fail if the user selects any rate outside these ranges. |
22 static int kValidInputRates[] = {96000, 48000, 44100, 32000, 16000}; | 24 static int kValidInputRates[] = {96000, 48000, 44100, 32000, 16000}; |
23 static int kValidOutputRates[] = {96000, 48000, 44100}; | 25 static int kValidOutputRates[] = {96000, 48000, 44100}; |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 } | 990 } |
989 | 991 |
990 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const { | 992 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const { |
991 NOTIMPLEMENTED(); | 993 NOTIMPLEMENTED(); |
992 return -1; | 994 return -1; |
993 } | 995 } |
994 | 996 |
995 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) { | 997 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) { |
996 session_id_ = session_id; | 998 session_id_ = session_id; |
997 } | 999 } |
OLD | NEW |