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 buffer, which is |
52 // called from a single thread. | 52 // guaranteed to be large enough. Can only be called from a single |
53 virtual void Mix(AudioFrame* audio_frame_for_mixing) = 0; | 53 // thread. |
aleloi
2016/08/05 09:52:21
We are moving away from the AudioFrame. In the fut
the sun
2016/08/05 12:26:00
Then why not float* instead of void*?
aleloi
2016/08/05 12:37:14
To do one change at a time, probably. Much of the
| |
54 virtual void Mix(int sample_rate, | |
55 size_t number_of_channels, | |
56 void* audio_data) = 0; | |
54 | 57 |
55 // Set the minimum sampling frequency at which to mix. The mixing algorithm | 58 // Set the minimum sampling frequency at which to mix. The mixing algorithm |
56 // may still choose to mix at a higher samling frequency to avoid | 59 // may still choose to mix at a higher samling frequency to avoid |
57 // downsampling of audio contributing to the mixed audio. | 60 // downsampling of audio contributing to the mixed audio. |
58 virtual int32_t SetMinimumMixingFrequency(Frequency freq) = 0; | 61 virtual int32_t SetMinimumMixingFrequency(Frequency freq) = 0; |
59 | 62 |
60 // Returns true if the audio source is mixed anonymously. | 63 // Returns true if the audio source is mixed anonymously. |
61 virtual bool AnonymousMixabilityStatus( | 64 virtual bool AnonymousMixabilityStatus( |
62 const MixerAudioSource& audio_source) const = 0; | 65 const MixerAudioSource& audio_source) const = 0; |
63 | 66 |
64 protected: | 67 protected: |
65 NewAudioConferenceMixer() {} | 68 NewAudioConferenceMixer() {} |
66 }; | 69 }; |
67 } // namespace webrtc | 70 } // namespace webrtc |
68 | 71 |
69 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_ | 72 #endif // WEBRTC_MODULES_AUDIO_MIXER_INCLUDE_NEW_AUDIO_CONFERENCE_MIXER_H_ |
OLD | NEW |