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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl.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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 webrtc::Config config; 314 webrtc::Config config;
315 return Create(config, nullptr); 315 return Create(config, nullptr);
316 } 316 }
317 317
318 AudioProcessing* AudioProcessing::Create(const webrtc::Config& config) { 318 AudioProcessing* AudioProcessing::Create(const webrtc::Config& config) {
319 return Create(config, nullptr); 319 return Create(config, nullptr);
320 } 320 }
321 321
322 AudioProcessing* AudioProcessing::Create(const webrtc::Config& config, 322 AudioProcessing* AudioProcessing::Create(const webrtc::Config& config,
323 NonlinearBeamformer* beamformer) { 323 NonlinearBeamformer* beamformer) {
324 AudioProcessingImpl* apm = new AudioProcessingImpl(config, beamformer); 324 AudioProcessingImpl* apm =
325 new rtc::RefCountedObject<AudioProcessingImpl>(config, beamformer);
325 if (apm->Initialize() != kNoError) { 326 if (apm->Initialize() != kNoError) {
326 delete apm; 327 delete apm;
327 apm = nullptr; 328 apm = nullptr;
328 } 329 }
329 330
330 return apm; 331 return apm;
331 } 332 }
332 333
333 AudioProcessingImpl::AudioProcessingImpl(const webrtc::Config& config) 334 AudioProcessingImpl::AudioProcessingImpl(const webrtc::Config& config)
334 : AudioProcessingImpl(config, nullptr) {} 335 : AudioProcessingImpl(config, nullptr) {}
(...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 previous_agc_level(0), 2256 previous_agc_level(0),
2256 echo_path_gain_change(false) {} 2257 echo_path_gain_change(false) {}
2257 2258
2258 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; 2259 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default;
2259 2260
2260 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; 2261 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default;
2261 2262
2262 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; 2263 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default;
2263 2264
2264 } // namespace webrtc 2265 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698