Records
Functions
-
template <typename T>double SampleToDouble (T value)Defined at line 20 of file ../../src/media/audio/lib/analysis/analysis.cc
-
template <>double SampleToDouble<unsigned char> (uint8_t value)Defined at line 24 of file ../../src/media/audio/lib/analysis/analysis.cc
-
void FFT (double * real, double * imag, uint32_t buf_size)Perform a Fast Fourier Transform on the provided data arrays.
On input, real[] and imag[] contain 'buf_size' number of double-float values
in the time domain (such as audio samples); buf_size must be a power-of-two.
On output, real[] and imag[] contain 'buf_size' number of double-float values
in frequency domain, but generally used only through buf_size/2 (per Nyquist)
Defined at line 71 of file ../../src/media/audio/lib/analysis/analysis.cc
-
double GetPhase (double real, double imag)Calculate phase for a given complex number, spanning [-PI, PI].
Defined at line 139 of file ../../src/media/audio/lib/analysis/analysis.cc
-
void RectangularToPolar (const double * real, const double * imag, uint32_t buf_size, double * magn, double * phase)Convert 2 incoming arrs (reals
&
imags == x
&
y) into magnitude and phase arrs. Magnitude is
absolute value, phase is in radians with range (-PI, PI].
Defined at line 160 of file ../../src/media/audio/lib/analysis/analysis.cc
-
void RealDFT (const double * reals, uint32_t len, double * r_freq, double * i_freq)Perform the Discrete Fourier Transform, converting time-domain reals[] (len buf_size) into
freq-domain real_freq[]
&
imag_freq[], both of length (buf_size/2 + 1).
This is a naive, unoptimized (N^2)/2 implementation.
Defined at line 176 of file ../../src/media/audio/lib/analysis/analysis.cc
-
void InverseDFT (double * real, double * imag, uint32_t buf_size, double * real_out)Converts frequency-domain arrays real_freq
&
imag_freq (len buf_size/2 + 1) into time-domain
array reals (len buf_size). This is a naive, unoptimized (N^2)/2 implementation.
Defined at line 199 of file ../../src/media/audio/lib/analysis/analysis.cc
-
void InverseFFT (double * realdouble * imaguint32_t buf_size)Converts frequency-domain arrays reals
&
imags (len buf_size) in-place into time-domain arrays
(also len buf_size)
Defined at line 224 of file ../../src/media/audio/lib/analysis/analysis.cc
Variables
DeferredLogBuffer *const deffered_log
Defined at line 10 of file ../../src/media/audio/audio_core/verbose_log.cc