Qualify cmath functions.
Use std:: qualified std::log10, std::log, std::floor and std::sin. Bug: None Change-Id: Ia78463f1505fcc5941f4c5ef66fc9346d9523cd4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128080 Reviewed-by: Sam Zackrisson <saza@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27141}
This commit is contained in:
committed by
Commit Bot
parent
bfe49481f8
commit
dbce09003d
@ -12,6 +12,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
#include "api/array_view.h"
|
||||
@ -35,8 +36,8 @@ void ProduceSinusoid(int sample_rate_hz,
|
||||
// Produce a sinusoid of the specified frequency.
|
||||
for (size_t k = *sample_counter, j = 0; k < (*sample_counter + kBlockSize);
|
||||
++k, ++j) {
|
||||
x[j] =
|
||||
32767.f * sin(2.f * kPi * sinusoidal_frequency_hz * k / sample_rate_hz);
|
||||
x[j] = 32767.f *
|
||||
std::sin(2.f * kPi * sinusoidal_frequency_hz * k / sample_rate_hz);
|
||||
}
|
||||
*sample_counter = *sample_counter + kBlockSize;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user