| 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 static const int kFrameDurationInMs = 10; | 46 static const int kFrameDurationInMs = 10; |
| 47 static const int kMaximumAmountOfMixedAudioSources = 3; | 47 static const int kMaximumAmountOfMixedAudioSources = 3; |
| 48 static const int kDefaultFrequency = 48000; | 48 static const int kDefaultFrequency = 48000; |
| 49 | 49 |
| 50 static rtc::scoped_refptr<AudioMixerImpl> Create(); | 50 static rtc::scoped_refptr<AudioMixerImpl> Create(); |
| 51 | 51 |
| 52 ~AudioMixerImpl() override; | 52 ~AudioMixerImpl() override; |
| 53 | 53 |
| 54 // AudioMixer functions | 54 // AudioMixer functions |
| 55 bool AddSource(Source* audio_source) override; | 55 bool AddSource(Source* audio_source) override; |
| 56 bool RemoveSource(Source* audio_source) override; | 56 void RemoveSource(Source* audio_source) override; |
| 57 | 57 |
| 58 void Mix(size_t number_of_channels, | 58 void Mix(size_t number_of_channels, |
| 59 AudioFrame* audio_frame_for_mixing) override LOCKS_EXCLUDED(crit_); | 59 AudioFrame* audio_frame_for_mixing) override LOCKS_EXCLUDED(crit_); |
| 60 | 60 |
| 61 // Returns true if the source was mixed last round. Returns | 61 // Returns true if the source was mixed last round. Returns |
| 62 // false and logs an error if the source was never added to the | 62 // false and logs an error if the source was never added to the |
| 63 // mixer. | 63 // mixer. |
| 64 bool GetAudioSourceMixabilityStatusForTest(Source* audio_source) const; | 64 bool GetAudioSourceMixabilityStatusForTest(Source* audio_source) const; |
| 65 | 65 |
| 66 protected: | 66 protected: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 uint32_t time_stamp_ GUARDED_BY(race_checker_); | 105 uint32_t time_stamp_ GUARDED_BY(race_checker_); |
| 106 | 106 |
| 107 // Used for inhibiting saturation in mixing. | 107 // Used for inhibiting saturation in mixing. |
| 108 std::unique_ptr<AudioProcessing> limiter_ GUARDED_BY(race_checker_); | 108 std::unique_ptr<AudioProcessing> limiter_ GUARDED_BY(race_checker_); |
| 109 | 109 |
| 110 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); | 110 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); |
| 111 }; | 111 }; |
| 112 } // namespace webrtc | 112 } // namespace webrtc |
| 113 | 113 |
| 114 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ | 114 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ |
| OLD | NEW |