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

Unified Diff: webrtc/modules/audio_mixer/audio_frame_manipulator.cc

Issue 2401603003: Reland of https://codereview.webrtc.org/2396483002/ (Closed)
Patch Set: Changed LOG macro. Created 4 years, 2 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
« no previous file with comments | « webrtc/modules/audio_mixer/audio_frame_manipulator.h ('k') | webrtc/modules/audio_mixer/audio_mixer.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_mixer/audio_frame_manipulator.cc
diff --git a/webrtc/modules/audio_mixer/audio_frame_manipulator.cc b/webrtc/modules/audio_mixer/audio_frame_manipulator.cc
index aafeedaeda9748100fe98b49dba72c516234ba19..7ced9e29fa9e1c522c0c2de0cb3a1a9e990ec386 100644
--- a/webrtc/modules/audio_mixer/audio_frame_manipulator.cc
+++ b/webrtc/modules/audio_mixer/audio_frame_manipulator.cc
@@ -30,11 +30,11 @@ const float kRampArray[] = {
const size_t kRampSize = sizeof(kRampArray) / sizeof(kRampArray[0]);
} // namespace
-uint32_t NewMixerCalculateEnergy(const AudioFrame& audio_frame) {
+uint32_t AudioMixerCalculateEnergy(const AudioFrame& audio_frame) {
uint32_t energy = 0;
for (size_t position = 0; position < audio_frame.samples_per_channel_;
position++) {
- // TODO(andrew): this can easily overflow.
+ // TODO(aleloi): This can overflow. Convert to floats.
energy += audio_frame.data_[position] * audio_frame.data_[position];
}
return energy;
« no previous file with comments | « webrtc/modules/audio_mixer/audio_frame_manipulator.h ('k') | webrtc/modules/audio_mixer/audio_mixer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698