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

Side by Side Diff: webrtc/modules/audio_processing/include/audio_processing.h

Issue 2463813002: Make use of new APM statistics interface. (Closed)
Patch Set: Remove DCHECKs on values of stats. Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « webrtc/audio/audio_send_stream_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 int average = 0; // Long-term average. 479 int average = 0; // Long-term average.
480 int maximum = 0; // Long-term maximum. 480 int maximum = 0; // Long-term maximum.
481 int minimum = 0; // Long-term minimum. 481 int minimum = 0; // Long-term minimum.
482 }; 482 };
483 483
484 struct Stat { 484 struct Stat {
485 void Set(const Statistic& other) { 485 void Set(const Statistic& other) {
486 Set(other.instant, other.average, other.maximum, other.minimum); 486 Set(other.instant, other.average, other.maximum, other.minimum);
487 } 487 }
488 void Set(float instant, float average, float maximum, float minimum) { 488 void Set(float instant, float average, float maximum, float minimum) {
489 RTC_DCHECK_LE(instant, maximum);
490 RTC_DCHECK_GE(instant, minimum);
491 RTC_DCHECK_LE(average, maximum);
492 RTC_DCHECK_GE(average, minimum);
493 instant_ = instant; 489 instant_ = instant;
494 average_ = average; 490 average_ = average;
495 maximum_ = maximum; 491 maximum_ = maximum;
496 minimum_ = minimum; 492 minimum_ = minimum;
497 } 493 }
498 float instant() const { return instant_; } 494 float instant() const { return instant_; }
499 float average() const { return average_; } 495 float average() const { return average_; }
500 float maximum() const { return maximum_; } 496 float maximum() const { return maximum_; }
501 float minimum() const { return minimum_; } 497 float minimum() const { return minimum_; }
502 498
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 // This does not impact the size of frames passed to |ProcessStream()|. 1068 // This does not impact the size of frames passed to |ProcessStream()|.
1073 virtual int set_frame_size_ms(int size) = 0; 1069 virtual int set_frame_size_ms(int size) = 0;
1074 virtual int frame_size_ms() const = 0; 1070 virtual int frame_size_ms() const = 0;
1075 1071
1076 protected: 1072 protected:
1077 virtual ~VoiceDetection() {} 1073 virtual ~VoiceDetection() {}
1078 }; 1074 };
1079 } // namespace webrtc 1075 } // namespace webrtc
1080 1076
1081 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ 1077 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
OLDNEW
« no previous file with comments | « webrtc/audio/audio_send_stream_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698