Skip to content

Commit 708eccc

Browse files
oprypinCommit Bot
authored andcommitted
Qualify cmath function calls.
Bug: webrtc:10433 Change-Id: Ib3644b2dad4f0068a81c76824b5d52cb7a5507e3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129862 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Oleh Prypin <oprypin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27374}
1 parent a7d8f19 commit 708eccc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎modules/audio_processing/audio_processing_unittest.cc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <stdio.h>
1212

1313
#include <algorithm>
14+
#include <cmath>
1415
#include <limits>
1516
#include <memory>
1617
#include <queue>
@@ -1780,7 +1781,7 @@ TEST_F(ApmTest, FloatAndIntInterfacesGiveSimilarResults) {
17801781
const float kSNRThreshold = 20;
17811782

17821783
// Skip frames with low energy.
1783-
if (sqrt(variance) > kVarianceThreshold && snr < kSNRThreshold) {
1784+
if (std::sqrt(variance) > kVarianceThreshold && snr < kSNRThreshold) {
17841785
++num_bad_chunks;
17851786
}
17861787
}
@@ -2393,7 +2394,7 @@ TEST_P(AudioProcessingTest, Formats) {
23932394
PushSincResampler::AlgorithmicDelaySeconds(out_rate);
23942395
}
23952396
int expected_delay =
2396-
floor(expected_delay_sec * ref_rate + 0.5f) * out_num;
2397+
std::floor(expected_delay_sec * ref_rate + 0.5f) * out_num;
23972398

23982399
double variance = 0;
23992400
double sq_error = 0;

0 commit comments

Comments
 (0)