| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool RemoveSource(Source* audio_source) override; |
| 57 | 57 |
| 58 void Mix(int sample_rate_hz, | 58 void Mix(int sample_rate_hz, |
| 59 size_t number_of_channels, | 59 size_t number_of_channels, |
| 60 AudioFrame* audio_frame_for_mixing) override; | 60 AudioFrame* audio_frame_for_mixing) override LOCKS_EXCLUDED(crit_); |
| 61 | 61 |
| 62 // Returns true if the source was mixed last round. Returns | 62 // Returns true if the source was mixed last round. Returns |
| 63 // false and logs an error if the source was never added to the | 63 // false and logs an error if the source was never added to the |
| 64 // mixer. | 64 // mixer. |
| 65 bool GetAudioSourceMixabilityStatusForTest(Source* audio_source) const; | 65 bool GetAudioSourceMixabilityStatusForTest(Source* audio_source) const; |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 explicit AudioMixerImpl(std::unique_ptr<AudioProcessing> limiter); | 68 explicit AudioMixerImpl(std::unique_ptr<AudioProcessing> limiter); |
| 69 | 69 |
| 70 private: | 70 private: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 uint32_t time_stamp_ GUARDED_BY(race_checker_); | 106 uint32_t time_stamp_ GUARDED_BY(race_checker_); |
| 107 | 107 |
| 108 // Used for inhibiting saturation in mixing. | 108 // Used for inhibiting saturation in mixing. |
| 109 std::unique_ptr<AudioProcessing> limiter_ GUARDED_BY(race_checker_); | 109 std::unique_ptr<AudioProcessing> limiter_ GUARDED_BY(race_checker_); |
| 110 | 110 |
| 111 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); | 111 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); |
| 112 }; | 112 }; |
| 113 } // namespace webrtc | 113 } // namespace webrtc |
| 114 | 114 |
| 115 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ | 115 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ |
| OLD | NEW |