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_capturer.h" | 5 #include "content/renderer/media/webrtc_audio_capturer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Supported hardware sample rates for input and output sides. | 25 // Supported hardware sample rates for input and output sides. |
26 #if defined(OS_WIN) || defined(OS_MACOSX) | 26 #if defined(OS_WIN) || defined(OS_MACOSX) |
27 // media::GetAudioInputHardwareSampleRate() asks the audio layer | 27 // media::GetAudioInputHardwareSampleRate() asks the audio layer |
28 // for its current sample rate (set by the user) on Windows and Mac OS X. | 28 // 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() | 29 // The listed rates below adds restrictions and WebRtcAudioDeviceImpl::Init() |
30 // will fail if the user selects any rate outside these ranges. | 30 // will fail if the user selects any rate outside these ranges. |
31 const int kValidInputRates[] = {96000, 48000, 44100, 32000, 16000, 8000}; | 31 const int kValidInputRates[] = |
32 {192000, 96000, 48000, 44100, 32000, 16000, 8000}; | |
32 #elif defined(OS_LINUX) || defined(OS_OPENBSD) | 33 #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
33 const int kValidInputRates[] = {48000, 44100}; | 34 const int kValidInputRates[] = {48000, 44100}; |
no longer working on chromium
2014/04/03 14:12:39
can we make {192000, 96000, 48000, 44100, 32000, 1
| |
34 #elif defined(OS_ANDROID) | 35 #elif defined(OS_ANDROID) |
35 const int kValidInputRates[] = {48000, 44100}; | 36 const int kValidInputRates[] = {48000, 44100}; |
36 #else | 37 #else |
37 const int kValidInputRates[] = {44100}; | 38 const int kValidInputRates[] = {44100}; |
38 #endif | 39 #endif |
39 | 40 |
40 } // namespace | 41 } // namespace |
41 | 42 |
42 // Reference counted container of WebRtcLocalAudioTrack delegate. | 43 // Reference counted container of WebRtcLocalAudioTrack delegate. |
43 // TODO(xians): Switch to MediaStreamAudioSinkOwner. | 44 // TODO(xians): Switch to MediaStreamAudioSinkOwner. |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
580 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue); | 581 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue); |
581 audio_processor_->StartAecDump(aec_dump_file); | 582 audio_processor_->StartAecDump(aec_dump_file); |
582 } | 583 } |
583 | 584 |
584 void WebRtcAudioCapturer::StopAecDump() { | 585 void WebRtcAudioCapturer::StopAecDump() { |
585 DCHECK(thread_checker_.CalledOnValidThread()); | 586 DCHECK(thread_checker_.CalledOnValidThread()); |
586 audio_processor_->StopAecDump(); | 587 audio_processor_->StopAecDump(); |
587 } | 588 } |
588 | 589 |
589 } // namespace content | 590 } // namespace content |
OLD | NEW |