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

Side by Side Diff: webrtc/audio/audio_state.cc

Issue 2948763002: Allow an external audio processing module to be used in WebRTC (Closed)
Patch Set: tracking linux32_rel issue Created 3 years, 6 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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/audio/audio_state.h" 11 #include "webrtc/audio/audio_state.h"
12 12
13 #include "webrtc/base/atomicops.h" 13 #include "webrtc/base/atomicops.h"
14 #include "webrtc/base/checks.h" 14 #include "webrtc/base/checks.h"
15 #include "webrtc/base/logging.h" 15 #include "webrtc/base/logging.h"
16 #include "webrtc/modules/audio_device/include/audio_device.h" 16 #include "webrtc/modules/audio_device/include/audio_device.h"
17 #include "webrtc/voice_engine/include/voe_errors.h" 17 #include "webrtc/voice_engine/include/voe_errors.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 namespace internal { 20 namespace internal {
21 21
22 AudioState::AudioState(const AudioState::Config& config) 22 AudioState::AudioState(const AudioState::Config& config)
23 : config_(config), 23 : config_(config),
24 voe_base_(config.voice_engine), 24 voe_base_(config.voice_engine),
25 audio_transport_proxy_(voe_base_->audio_transport(), 25 audio_transport_proxy_(voe_base_->audio_transport(),
26 voe_base_->audio_processing(), 26 config_.audio_processing.get(),
27 config_.audio_mixer) { 27 config_.audio_mixer) {
28 process_thread_checker_.DetachFromThread(); 28 process_thread_checker_.DetachFromThread();
29 RTC_DCHECK(config_.audio_mixer); 29 RTC_DCHECK(config_.audio_mixer);
30 30
31 // Only one AudioState should be created per VoiceEngine. 31 // Only one AudioState should be created per VoiceEngine.
32 RTC_CHECK(voe_base_->RegisterVoiceEngineObserver(*this) != -1); 32 RTC_CHECK(voe_base_->RegisterVoiceEngineObserver(*this) != -1);
33 33
34 auto* const device = voe_base_->audio_device_module(); 34 auto* const device = voe_base_->audio_device_module();
35 RTC_DCHECK(device); 35 RTC_DCHECK(device);
36 36
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 typing_noise_detected_ = false; 89 typing_noise_detected_ = false;
90 } 90 }
91 } 91 }
92 } // namespace internal 92 } // namespace internal
93 93
94 rtc::scoped_refptr<AudioState> AudioState::Create( 94 rtc::scoped_refptr<AudioState> AudioState::Create(
95 const AudioState::Config& config) { 95 const AudioState::Config& config) {
96 return rtc::scoped_refptr<AudioState>(new internal::AudioState(config)); 96 return rtc::scoped_refptr<AudioState>(new internal::AudioState(config));
97 } 97 }
98 } // namespace webrtc 98 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698