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:
Mirko Bonadei
2019-03-15 07:39:02 +01:00
committed by Commit Bot
parent bfe49481f8
commit dbce09003d
8 changed files with 24 additions and 17 deletions

View File

@ -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;
}