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

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

Issue 2298163002: Simplifications of the mixing algorithm. (Closed)
Patch Set: Initial PS Created 4 years, 4 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 6f612ca9abea0ca713efefd23611965ed0080d27..ac4af639b83c5c6dbea8df18d82163566a82d147 100644
--- a/webrtc/modules/audio_mixer/audio_mixer_impl.h
+++ b/webrtc/modules/audio_mixer/audio_mixer_impl.h
@@ -26,13 +26,7 @@ namespace webrtc {
class AudioProcessing;
class CriticalSectionWrapper;
-struct FrameAndMuteInfo {
- FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {}
- AudioFrame* frame;
- bool muted;
-};
-
-typedef std::list<FrameAndMuteInfo> AudioFrameList;
aleloi 2016/08/31 11:34:29 Mixing structure is a little simplified. Mute info
+typedef std::list<AudioFrame*> AudioFrameList;
ivoc 2016/08/31 15:01:06 I think list is in many cases less efficient than
aleloi 2016/08/31 15:25:34 Will watch! I think the right way is to make a pe
aleloi 2016/09/01 13:20:43 Got convinced by watching. Changed to vector.
typedef std::list<MixerAudioSource*> MixerAudioSourceList;
// Cheshire cat implementation of MixerAudioSource's non virtual functions.
@@ -86,11 +80,10 @@ class AudioMixerImpl : public AudioMixer {
int32_t SetOutputFrequency(const Frequency& frequency);
Frequency OutputFrequency() const;
- // Compute what audio sources to mix from audio_source_list_. Ramp in
- // and out. Update mixed status. maxAudioFrameCounter specifies how
- // many participants are allowed to be mixed.
- AudioFrameList UpdateToMix(size_t maxAudioFrameCounter) const
- EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ // Compute what audio sources to mix from audio_source_list_. Ramp
+ // in and out. Update mixed status. Mixes up to
+ // kMaximumAmountOfMixedAudioSources audio sources.
+ AudioFrameList GetNonAnonymousAudio() const EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Return the lowest mixing frequency that can be used without having to
// downsample any audio.
@@ -98,9 +91,9 @@ class AudioMixerImpl : public AudioMixer {
int32_t GetLowestMixingFrequencyFromList(
const MixerAudioSourceList& mixList) const;
- // Return the AudioFrames that should be mixed anonymously.
- void GetAdditionalAudio(AudioFrameList* additionalFramesList) const
- EXCLUSIVE_LOCKS_REQUIRED(crit_);
aleloi 2016/08/31 11:34:29 Made naming and signature more consistent between
+ // Return the AudioFrames that should be mixed anonymously. Ramp in
+ // and out. Update mixed status.
+ AudioFrameList GetAnonymousAudio() const EXCLUSIVE_LOCKS_REQUIRED(crit_);
// This function returns true if it finds the MixerAudioSource in the
// specified list of MixerAudioSources.
@@ -120,12 +113,6 @@ class AudioMixerImpl : public AudioMixer {
int32_t id,
bool use_limiter);
- // Mix the AudioFrames stored in audioFrameList into mixedAudio. No
- // record will be kept of this mix (e.g. the corresponding MixerAudioSources
- // will not be marked as IsMixed()
- int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio,
- const AudioFrameList& audioFrameList) const;
-
aleloi 2016/08/31 11:34:29 Merged with MixFromList
bool LimitMixedAudio(AudioFrame* mixedAudio) const;
// Output level functions for VoEVolumeControl.
« no previous file with comments | « no previous file | webrtc/modules/audio_mixer/audio_mixer_impl.cc » ('j') | webrtc/modules/audio_mixer/audio_mixer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698