Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: webrtc/modules/audio_mixer/audio_mixer_impl.h

Issue 2302483002: Style changes in Audio Mixer (Closed)
Patch Set: Removed size_t everywhere in favor of int. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_mixer/audio_mixer_impl.h
diff --git a/webrtc/modules/audio_mixer/audio_mixer_impl.h b/webrtc/modules/audio_mixer/audio_mixer_impl.h
index 0fd49b661ee8c59bd4b574b729d486647eeb0a1a..508d4a4739cd0ac56206c5d6dc121e5edf656a99 100644
--- a/webrtc/modules/audio_mixer/audio_mixer_impl.h
+++ b/webrtc/modules/audio_mixer/audio_mixer_impl.h
@@ -15,41 +15,21 @@
#include <memory>
#include <vector>
+#include "webrtc/base/thread_annotations.h"
#include "webrtc/base/thread_checker.h"
#include "webrtc/engine_configurations.h"
#include "webrtc/modules/audio_mixer/audio_mixer.h"
+#include "webrtc/modules/audio_mixer/audio_mixer_defines.h"
+#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/include/module_common_types.h"
+#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/voice_engine/level_indicator.h"
namespace webrtc {
-class AudioProcessing;
-class CriticalSectionWrapper;
typedef std::vector<AudioFrame*> AudioFrameList;
typedef std::vector<MixerAudioSource*> MixerAudioSourceList;
-// Cheshire cat implementation of MixerAudioSource's non virtual functions.
-class NewMixHistory {
- public:
- NewMixHistory();
- ~NewMixHistory();
-
- // Returns true if the audio source is being mixed.
- bool IsMixed() const;
-
- // Returns true if the audio source was mixed previous mix
- // iteration.
- bool WasMixed() const;
-
- // Updates the mixed status.
- int32_t SetIsMixed(bool mixed);
-
- void ResetMixedStatus();
-
- private:
- bool is_mixed_;
-};
-
class AudioMixerImpl : public AudioMixer {
public:
// AudioProcessing only accepts 10 ms frames.
@@ -69,7 +49,7 @@ class AudioMixerImpl : public AudioMixer {
int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source,
bool mixable) override;
void Mix(int sample_rate,
- size_t number_of_channels,
+ int number_of_channels,
AudioFrame* audio_frame_for_mixing) override;
bool AnonymousMixabilityStatus(
const MixerAudioSource& audio_source) const override;
@@ -100,12 +80,6 @@ class AudioMixerImpl : public AudioMixer {
bool RemoveAudioSourceFromList(MixerAudioSource* remove_audio_source,
MixerAudioSourceList* audio_source_list) const;
- // Mix the AudioFrames stored in audioFrameList into mixed_audio.
- static int32_t MixFromList(AudioFrame* mixed_audio,
- const AudioFrameList& audio_frame_list,
- int32_t id,
- bool use_limiter);
-
bool LimitMixedAudio(AudioFrame* mixed_audio) const;
// Output level functions for VoEVolumeControl.
@@ -127,7 +101,7 @@ class AudioMixerImpl : public AudioMixer {
// Always mixed, anonymously.
MixerAudioSourceList additional_audio_source_list_ GUARDED_BY(crit_);
- size_t num_mixed_audio_sources_ GUARDED_BY(crit_);
+ int num_mixed_audio_sources_ GUARDED_BY(crit_);
// Determines if we will use a limiter for clipping protection during
// mixing.
bool use_limiter_ ACCESS_ON(&thread_checker_);

Powered by Google App Engine
This is Rietveld 408576698