Update to current webrtc library
This is from the upstream library commit id 3326535126e435f1ba647885ce43a8f0f3d317eb, corresponding to Chromium 88.0.4290.1.
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
// MSVC++ requires this to be set before any other includes to get M_PI.
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
#include "webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h"
|
||||
#include "common_audio/resampler/sinusoidal_linear_chirp_source.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@ -43,8 +43,7 @@ void SinusoidalLinearChirpSource::Run(size_t frames, float* destination) {
|
||||
} else {
|
||||
// Sinusoidal linear chirp.
|
||||
double t = (current_index_ - delay_samples_) / sample_rate_;
|
||||
destination[i] =
|
||||
sin(2 * M_PI * (kMinFrequency * t + (k_ / 2) * t * t));
|
||||
destination[i] = sin(2 * M_PI * (kMinFrequency * t + (k_ / 2) * t * t));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -52,7 +51,7 @@ void SinusoidalLinearChirpSource::Run(size_t frames, float* destination) {
|
||||
|
||||
double SinusoidalLinearChirpSource::Frequency(size_t position) {
|
||||
return kMinFrequency + (position - delay_samples_) *
|
||||
(max_frequency_ - kMinFrequency) / total_samples_;
|
||||
(max_frequency_ - kMinFrequency) / total_samples_;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user