OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 30 matching lines...) Expand all Loading... | |
41 virtual bool MixabilityStatus(const MixerAudioSource& audio_source) const = 0; | 41 virtual bool MixabilityStatus(const MixerAudioSource& audio_source) const = 0; |
42 | 42 |
43 // Inform the mixer that the audio source should always be mixed and not | 43 // Inform the mixer that the audio source should always be mixed and not |
44 // count toward the number of mixed audio sources. Note that an audio source | 44 // count toward the number of mixed audio sources. Note that an audio source |
45 // must have been added to the mixer (by calling SetMixabilityStatus()) | 45 // must have been added to the mixer (by calling SetMixabilityStatus()) |
46 // before this function can be successfully called. | 46 // before this function can be successfully called. |
47 virtual int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source, | 47 virtual int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source, |
48 bool mixable) = 0; | 48 bool mixable) = 0; |
49 | 49 |
50 // Performs mixing by asking registered audio sources for audio. The | 50 // Performs mixing by asking registered audio sources for audio. The |
51 // mixed result is placed in the provided AudioFrame. Can only be | 51 // mixed result is placed in the provided AudioFrame. Can only be |
minyue-webrtc
2016/08/08 15:05:44
add comments on the new arguments
| |
52 // called from a single thread. | 52 // called from a single thread. |
53 virtual void Mix(AudioFrame* audio_frame_for_mixing) = 0; | 53 virtual void Mix(int sample_rate, |
54 | 54 size_t number_of_channels, |
55 // Set the minimum sampling frequency at which to mix. The mixing algorithm | 55 AudioFrame* audio_frame_for_mixing) = 0; |
56 // may still choose to mix at a higher samling frequency to avoid | |
57 // downsampling of audio contributing to the mixed audio. | |
58 virtual int32_t SetMinimumMixingFrequency(Frequency freq) = 0; | |
59 | 56 |
60 // Returns true if the audio source is mixed anonymously. | 57 // Returns true if the audio source is mixed anonymously. |
61 virtual bool AnonymousMixabilityStatus( | 58 virtual bool AnonymousMixabilityStatus( |
62 const MixerAudioSource& audio_source) const = 0; | 59 const MixerAudioSource& audio_source) const = 0; |
63 | 60 |
64 protected: | 61 protected: |
65 NewAudioConferenceMixer() {} | 62 NewAudioConferenceMixer() {} |
66 }; | 63 }; |
67 } // namespace webrtc | 64 } // namespace webrtc |
68 | 65 |
69 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_ | 66 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_ |
OLD | NEW |