| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 bool RemoveSource(Source* audio_source) override; | 56 bool 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 // Returns true if a source has been added but not removed. |
| 67 bool GetSourcePresenceStatusForTest(Source* audio_source) const; |
| 68 |
| 66 protected: | 69 protected: |
| 67 explicit AudioMixerImpl(std::unique_ptr<AudioProcessing> limiter); | 70 explicit AudioMixerImpl(std::unique_ptr<AudioProcessing> limiter); |
| 68 | 71 |
| 69 private: | 72 private: |
| 70 // Set/get mix frequency | 73 // Set/get mix frequency |
| 71 void SetOutputFrequency(int frequency); | 74 void SetOutputFrequency(int frequency); |
| 72 int OutputFrequency() const; | 75 int OutputFrequency() const; |
| 73 | 76 |
| 74 // Compute what audio sources to mix from audio_source_list_. Ramp | 77 // Compute what audio sources to mix from audio_source_list_. Ramp |
| 75 // in and out. Update mixed status. Mixes up to | 78 // in and out. Update mixed status. Mixes up to |
| (...skipping 29 matching lines...) Expand all Loading... |
| 105 uint32_t time_stamp_ GUARDED_BY(race_checker_); | 108 uint32_t time_stamp_ GUARDED_BY(race_checker_); |
| 106 | 109 |
| 107 // Used for inhibiting saturation in mixing. | 110 // Used for inhibiting saturation in mixing. |
| 108 std::unique_ptr<AudioProcessing> limiter_ GUARDED_BY(race_checker_); | 111 std::unique_ptr<AudioProcessing> limiter_ GUARDED_BY(race_checker_); |
| 109 | 112 |
| 110 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); | 113 RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); |
| 111 }; | 114 }; |
| 112 } // namespace webrtc | 115 } // namespace webrtc |
| 113 | 116 |
| 114 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ | 117 #endif // WEBRTC_MODULES_AUDIO_MIXER_AUDIO_MIXER_IMPL_H_ |
| OLD | NEW |