Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
minimal hires fft
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanpasu64 committed Mar 22, 2018
1 parent 16a3f58 commit 8af26ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/VisualizerSpectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void CVisualizerSpectrum::SetSampleData(short *pSamples, unsigned int iCount)
int offset = 0;

if (m_iFillPos > 0) {
const int size = FFT_POINTS - m_iFillPos;
const int size = std::min((int)iCount, FFT_POINTS - m_iFillPos);
std::copy_n(pSamples, size, m_pSampleBuffer.begin() + m_iFillPos);
Transform(m_pSampleBuffer.data(), FFT_POINTS);
offset += size;
Expand Down
2 changes: 1 addition & 1 deletion Source/VisualizerSpectrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

// CVisualizerSpectrum, spectrum style visualizer

const int FFT_POINTS = 256;
const int FFT_POINTS = 1024;

class CVisualizerSpectrum : public CVisualizerBase
{
Expand Down

0 comments on commit 8af26ab

Please sign in to comment.