| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // Returns true if the audio source was mixed previous mix | 46 // Returns true if the audio source was mixed previous mix |
| 47 // iteration. | 47 // iteration. |
| 48 bool WasMixed() const; | 48 bool WasMixed() const; |
| 49 | 49 |
| 50 // Updates the mixed status. | 50 // Updates the mixed status. |
| 51 int32_t SetIsMixed(bool mixed); | 51 int32_t SetIsMixed(bool mixed); |
| 52 | 52 |
| 53 void ResetMixedStatus(); | 53 void ResetMixedStatus(); |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 bool _isMixed; | 56 bool is_mixed_; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class NewAudioConferenceMixerImpl : public NewAudioConferenceMixer { | 59 class NewAudioConferenceMixerImpl : public NewAudioConferenceMixer { |
| 60 public: | 60 public: |
| 61 // AudioProcessing only accepts 10 ms frames. | 61 // AudioProcessing only accepts 10 ms frames. |
| 62 enum { kProcessPeriodicityInMs = 10 }; | 62 enum { kProcessPeriodicityInMs = 10 }; |
| 63 | 63 |
| 64 explicit NewAudioConferenceMixerImpl(int id); | 64 explicit NewAudioConferenceMixerImpl(int id); |
| 65 | 65 |
| 66 // Must be called after ctor. | 66 // Must be called after ctor. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 bool use_limiter); | 116 bool use_limiter); |
| 117 | 117 |
| 118 // Mix the AudioFrames stored in audioFrameList into mixedAudio. No | 118 // Mix the AudioFrames stored in audioFrameList into mixedAudio. No |
| 119 // record will be kept of this mix (e.g. the corresponding MixerAudioSources | 119 // record will be kept of this mix (e.g. the corresponding MixerAudioSources |
| 120 // will not be marked as IsMixed() | 120 // will not be marked as IsMixed() |
| 121 int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio, | 121 int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio, |
| 122 const AudioFrameList& audioFrameList) const; | 122 const AudioFrameList& audioFrameList) const; |
| 123 | 123 |
| 124 bool LimitMixedAudio(AudioFrame* mixedAudio) const; | 124 bool LimitMixedAudio(AudioFrame* mixedAudio) const; |
| 125 | 125 |
| 126 std::unique_ptr<CriticalSectionWrapper> _crit; | 126 std::unique_ptr<CriticalSectionWrapper> crit_; |
| 127 std::unique_ptr<CriticalSectionWrapper> _cbCrit; | 127 std::unique_ptr<CriticalSectionWrapper> cb_crit_; |
| 128 | 128 |
| 129 int32_t _id; | 129 int32_t id_; |
| 130 | 130 |
| 131 // The current sample frequency and sample size when mixing. | 131 // The current sample frequency and sample size when mixing. |
| 132 Frequency _outputFrequency; | 132 Frequency output_frequency_; |
| 133 size_t _sampleSize; | 133 size_t sample_size_; |
| 134 | 134 |
| 135 // List of all audio sources. Note all lists are disjunct | 135 // List of all audio sources. Note all lists are disjunct |
| 136 MixerAudioSourceList audio_source_list_; // May be mixed. | 136 MixerAudioSourceList audio_source_list_; // May be mixed. |
| 137 | 137 |
| 138 // Always mixed, anonomously. | 138 // Always mixed, anonomously. |
| 139 MixerAudioSourceList additional_audio_source_list_; | 139 MixerAudioSourceList additional_audio_source_list_; |
| 140 | 140 |
| 141 size_t num_mixed_audio_sources_; | 141 size_t num_mixed_audio_sources_; |
| 142 // Determines if we will use a limiter for clipping protection during | 142 // Determines if we will use a limiter for clipping protection during |
| 143 // mixing. | 143 // mixing. |
| 144 bool use_limiter_; | 144 bool use_limiter_; |
| 145 | 145 |
| 146 uint32_t _timeStamp; | 146 uint32_t time_stamp_; |
| 147 | 147 |
| 148 // Ensures that Mix is called from the same thread. | 148 // Ensures that Mix is called from the same thread. |
| 149 rtc::ThreadChecker thread_checker_; | 149 rtc::ThreadChecker thread_checker_; |
| 150 | 150 |
| 151 // Used for inhibiting saturation in mixing. | 151 // Used for inhibiting saturation in mixing. |
| 152 std::unique_ptr<AudioProcessing> _limiter; | 152 std::unique_ptr<AudioProcessing> limiter_; |
| 153 }; | 153 }; |
| 154 } // namespace webrtc | 154 } // namespace webrtc |
| 155 | 155 |
| 156 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ | 156 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ |
| OLD | NEW |