diff options
| author | 2018-12-03 12:44:10 -0800 | |
|---|---|---|
| committer | 2018-12-04 17:36:40 +0000 | |
| commit | ca6a9f8feff41ac2fdc78a3df3fbfbb79361b100 (patch) | |
| tree | aafd8cba0d4ebf0acd850c0f8a77882eae6b2e17 /libs/hwui/HardwareBitmapUploader.cpp | |
| parent | b9df101c9eac5ce534f274c04913e54ea2c3de1d (diff) | |
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
Diffstat (limited to 'libs/hwui/HardwareBitmapUploader.cpp')
0 files changed, 0 insertions, 0 deletions