Chromium Code Reviews| Index: webrtc/modules/audio_mixer/audio_mixer.h |
| diff --git a/webrtc/modules/audio_mixer/audio_mixer.h b/webrtc/modules/audio_mixer/audio_mixer.h |
| index 207510dec25de859b9e11848037edce15f1c6906..5729e14288c32650f5e755160d830ab7e9f39cd0 100644 |
| --- a/webrtc/modules/audio_mixer/audio_mixer.h |
| +++ b/webrtc/modules/audio_mixer/audio_mixer.h |
| @@ -13,7 +13,6 @@ |
| #include <memory> |
| -#include "webrtc/modules/include/module.h" |
|
aleloi
2016/10/10 12:54:39
Was not used since when the mixer derived from Mod
the sun
2016/10/10 13:46:06
Acknowledged.
|
| #include "webrtc/modules/include/module_common_types.h" |
| namespace webrtc { |
| @@ -21,14 +20,6 @@ namespace webrtc { |
| class AudioMixer { |
| public: |
| static const int kMaximumAmountOfMixedAudioSources = 3; |
| - enum Frequency { |
| - kNbInHz = 8000, |
| - kWbInHz = 16000, |
| - kSwbInHz = 32000, |
| - kFbInHz = 48000, |
| - kDefaultFrequency = kWbInHz |
| - }; |
| - |
|
aleloi
2016/10/10 12:54:39
All frequencies are allowed now.
the sun
2016/10/10 13:46:06
Acknowledged.
|
| // A callback class that all mixer participants must inherit from/implement. |
| class Source { |
| public: |
| @@ -51,52 +42,26 @@ class AudioMixer { |
| // different calls. The pointer must stay valid until the next |
| // mixing call or until this audio source is disconnected from the |
| // mixer. |
| - virtual AudioFrameWithMuted GetAudioFrameWithMuted(int32_t id, |
| - int sample_rate_hz) = 0; |
|
aleloi
2016/10/10 12:54:39
The id is removed everywhere.
the sun
2016/10/10 13:46:06
Acknowledged.
|
| + virtual AudioFrameWithMuted GetAudioFrameWithMuted(int sample_rate_hz) = 0; |
| protected: |
| virtual ~Source() {} |
| }; |
| // Factory method. Constructor disabled. |
| - static std::unique_ptr<AudioMixer> Create(int id); |
| + static std::unique_ptr<AudioMixer> Create(); |
| virtual ~AudioMixer() {} |
| // Add/remove audio sources as candidates for mixing. |
| virtual int32_t SetMixabilityStatus(Source* audio_source, bool mixable) = 0; |
| - // Returns true if an audio source is a candidate for mixing. |
| - virtual bool MixabilityStatus(const Source& audio_source) const = 0; |
| - |
| - // Inform the mixer that the audio source should always be mixed and not |
| - // count toward the number of mixed audio sources. Note that an audio source |
| - // must have been added to the mixer (by calling SetMixabilityStatus()) |
| - // before this function can be successfully called. |
| - virtual int32_t SetAnonymousMixabilityStatus(Source* audio_source, |
| - bool mixable) = 0; |
|
aleloi
2016/10/10 12:54:39
Removed anonymous mixing.
the sun
2016/10/10 13:46:06
yay!
|
| // Performs mixing by asking registered audio sources for audio. The |
| - // mixed result is placed in the provided AudioFrame. Can only be |
| + // mixed result is placed in the provided AudioFrame. Should only be |
| // called from a single thread. The rate and channels arguments |
|
aleloi
2016/10/10 12:54:39
The threading comments refer to our particular mix
the sun
2016/10/10 13:46:06
Replace "Should" with "Will". The implementer need
aleloi
2016/10/10 14:10:16
Done.
|
| // specify the rate and number of channels of the mix result. |
| - virtual void Mix(int sample_rate, |
| + virtual void Mix(int sample_rate_hz, |
| size_t number_of_channels, |
| AudioFrame* audio_frame_for_mixing) = 0; |
| - |
| - // Returns true if the audio source is mixed anonymously. |
| - virtual bool AnonymousMixabilityStatus(const Source& audio_source) const = 0; |
| - |
| - // Output level functions for VoEVolumeControl. Return value |
| - // between 0 and 9 is returned by voe::AudioLevel. |
| - virtual int GetOutputAudioLevel() = 0; |
| - |
| - // Return value between 0 and 0x7fff is returned by voe::AudioLevel. |
| - virtual int GetOutputAudioLevelFullRange() = 0; |
| - |
| - protected: |
| - AudioMixer() {} |
| - |
| - private: |
| - RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixer); |
|
aleloi
2016/10/10 12:54:39
Also removed the audio level functionality (it is
the sun
2016/10/10 13:46:06
Acknowledged.
|
| }; |
| } // namespace webrtc |