| 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 |
| 11 #include "webrtc/modules/audio_mixer/new_audio_conference_mixer_impl.h" | 11 #include "webrtc/modules/audio_mixer/new_audio_conference_mixer_impl.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 #include <functional> | 14 #include <functional> |
| 15 | 15 |
| 16 #include "webrtc/modules/audio_mixer/audio_frame_manipulator.h" | 16 #include "webrtc/modules/audio_mixer/audio_frame_manipulator.h" |
| 17 #include "webrtc/modules/audio_mixer/audio_mixer_defines.h" | 17 #include "webrtc/modules/audio_mixer/audio_mixer_defines.h" |
| 18 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 18 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 19 #include "webrtc/modules/utility/include/audio_frame_operations.h" | 19 #include "webrtc/modules/utility/include/audio_frame_operations.h" |
| 20 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 20 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
| 21 #include "webrtc/system_wrappers/include/trace.h" | 21 #include "webrtc/system_wrappers/include/trace.h" |
| 22 #include "webrtc/voice_engine/utility.h" | |
| 23 | 22 |
| 24 namespace webrtc { | 23 namespace webrtc { |
| 25 namespace { | 24 namespace { |
| 26 | 25 |
| 27 class SourceFrame { | 26 class SourceFrame { |
| 28 public: | 27 public: |
| 29 SourceFrame(MixerAudioSource* p, AudioFrame* a, bool m, bool was_mixed_before) | 28 SourceFrame(MixerAudioSource* p, AudioFrame* a, bool m, bool was_mixed_before) |
| 30 : audio_source_(p), | 29 : audio_source_(p), |
| 31 audio_frame_(a), | 30 audio_frame_(a), |
| 32 muted_(m), | 31 muted_(m), |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 output_frequency_(kDefaultFrequency), | 134 output_frequency_(kDefaultFrequency), |
| 136 sample_size_(0), | 135 sample_size_(0), |
| 137 audio_source_list_(), | 136 audio_source_list_(), |
| 138 additional_audio_source_list_(), | 137 additional_audio_source_list_(), |
| 139 num_mixed_audio_sources_(0), | 138 num_mixed_audio_sources_(0), |
| 140 use_limiter_(true), | 139 use_limiter_(true), |
| 141 time_stamp_(0) { | 140 time_stamp_(0) { |
| 142 thread_checker_.DetachFromThread(); | 141 thread_checker_.DetachFromThread(); |
| 143 } | 142 } |
| 144 | 143 |
| 144 NewAudioConferenceMixerImpl::~NewAudioConferenceMixerImpl() {} |
| 145 |
| 145 bool NewAudioConferenceMixerImpl::Init() { | 146 bool NewAudioConferenceMixerImpl::Init() { |
| 146 crit_.reset(CriticalSectionWrapper::CreateCriticalSection()); | 147 crit_.reset(CriticalSectionWrapper::CreateCriticalSection()); |
| 147 if (crit_.get() == NULL) | 148 if (crit_.get() == NULL) |
| 148 return false; | 149 return false; |
| 149 | 150 |
| 150 cb_crit_.reset(CriticalSectionWrapper::CreateCriticalSection()); | 151 cb_crit_.reset(CriticalSectionWrapper::CreateCriticalSection()); |
| 151 if (cb_crit_.get() == NULL) | 152 if (cb_crit_.get() == NULL) |
| 152 return false; | 153 return false; |
| 153 | 154 |
| 154 Config config; | 155 Config config; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 | 585 |
| 585 if (error != limiter_->kNoError) { | 586 if (error != limiter_->kNoError) { |
| 586 WEBRTC_TRACE(kTraceError, kTraceAudioMixerServer, id_, | 587 WEBRTC_TRACE(kTraceError, kTraceAudioMixerServer, id_, |
| 587 "Error from AudioProcessing: %d", error); | 588 "Error from AudioProcessing: %d", error); |
| 588 RTC_NOTREACHED(); | 589 RTC_NOTREACHED(); |
| 589 return false; | 590 return false; |
| 590 } | 591 } |
| 591 return true; | 592 return true; |
| 592 } | 593 } |
| 593 } // namespace webrtc | 594 } // namespace webrtc |
| OLD | NEW |