OLD | NEW |
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 Loading... |
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 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2259 previous_agc_level(0), | 2260 previous_agc_level(0), |
2260 echo_path_gain_change(false) {} | 2261 echo_path_gain_change(false) {} |
2261 | 2262 |
2262 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 2263 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
2263 | 2264 |
2264 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 2265 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
2265 | 2266 |
2266 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 2267 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
2267 | 2268 |
2268 } // namespace webrtc | 2269 } // namespace webrtc |
OLD | NEW |