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

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

Issue 2659423002: Consistent 30% improvement in audio mixer running time. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | 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 ff4c31e6675d0642081878231864978b2e914323..8aa0b5ce02dc35c6bd3a9d4a90de48ca82f015d8 100644
--- a/webrtc/modules/audio_mixer/audio_frame_manipulator.cc
+++ b/webrtc/modules/audio_mixer/audio_frame_manipulator.cc
@@ -29,6 +29,9 @@ void Ramp(float start_gain, float target_gain, AudioFrame* audio_frame) {
RTC_DCHECK(audio_frame);
RTC_DCHECK_GE(start_gain, 0.0f);
RTC_DCHECK_GE(target_gain, 0.0f);
+ if (start_gain == target_gain) {
the sun 2017/02/07 08:53:22 Comparing floats is fuzzy and operator == is not t
hlundin-webrtc 2017/02/07 21:34:51 No, I know of no such function in our codebase.
+ return;
+ }
size_t samples = audio_frame->samples_per_channel_;
RTC_DCHECK_LT(0, samples);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698