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