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

Unified Diff: webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc

Issue 1589953002: Removing webrtc::AudioFrame::energy_. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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_conference_mixer/source/audio_conference_mixer_impl.cc
diff --git a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
index afb060f46df246d47685e3425692e6a94fc7c35a..4b3ff8d249123e315be4be4c2eb232abc164dd6c 100644
--- a/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
+++ b/webrtc/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
@@ -583,17 +583,16 @@ void AudioConferenceMixerImpl::UpdateToMix(
// There are already more active participants than should be
// mixed. Only keep the ones with the highest energy.
AudioFrameList::iterator replaceItem;
- CalculateEnergy(*audioFrame);
- uint32_t lowestEnergy = audioFrame->energy_;
+ uint32_t lowestEnergy = CalculateEnergy(*audioFrame);
bool found_replace_item = false;
for (AudioFrameList::iterator iter = activeList.begin();
iter != activeList.end();
++iter) {
- CalculateEnergy(**iter);
- if((*iter)->energy_ < lowestEnergy) {
+ uint32_t energy = CalculateEnergy(**iter);
hlundin-webrtc 2016/01/19 08:25:02 const
minyue-webrtc 2016/01/22 15:05:50 Done.
+ if(energy < lowestEnergy) {
replaceItem = iter;
- lowestEnergy = (*iter)->energy_;
+ lowestEnergy = energy;
found_replace_item = true;
}
}

Powered by Google App Engine
This is Rietveld 408576698