Update and fix Visualizer class docs
1) Fix the formula for the 'kth frequency' in getFft method:
since the 'fft' array holds n / 2 frequencies ranging from
0 to Fs / 2, the correct formula is k*Fs/n.
Also fix the last frequency index in the table.
2) Move the sample code for calculating magnitudes and phases
from the fft array from 'onFftDataCapture' to 'getFft', provide
a link.
3) Fix the sample code which wasn't taking into account that
fft[0] is the real part of FFT at DC, and fft[1] is the real part
of FFT at Fs / 2. Improve the sample code by linking the variable
names closer to the variable names in the documentation.
Bug: 113790190
Test: atest CtsMediaTestCases:VisualizerTest
Change-Id: I07cc9cfcda5b8c44aae2742a26173e7a9475120a
1 file changed