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

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: after review 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..9411a9a47e4892e3595b8aedcfe03875799a2ddb 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) {
+ const uint32_t energy = CalculateEnergy(**iter);
+ if(energy < lowestEnergy) {
replaceItem = iter;
- lowestEnergy = (*iter)->energy_;
+ lowestEnergy = energy;
found_replace_item = true;
}
}
@@ -783,18 +782,6 @@ void AudioConferenceMixerImpl::ClearAudioFrameList(
audioFrameList->clear();
}
-void AudioConferenceMixerImpl::UpdateVADPositiveParticipants(
- AudioFrameList* mixList) const {
- WEBRTC_TRACE(kTraceStream, kTraceAudioMixerServer, _id,
- "UpdateVADPositiveParticipants(mixList)");
-
- for (AudioFrameList::const_iterator iter = mixList->begin();
- iter != mixList->end();
- ++iter) {
- CalculateEnergy(**iter);
- }
-}
-
bool AudioConferenceMixerImpl::IsParticipantInList(
const MixerParticipant& participant,
const MixerParticipantList& participantList) const {

Powered by Google App Engine
This is Rietveld 408576698