Skip to content

Commit

Permalink
Remove compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed May 12, 2019
1 parent d128878 commit 2c81fb9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions lib/qm-dsp/dsp/chromagram/Chromagram.cpp
Expand Up @@ -134,7 +134,7 @@ double* Chromagram::process( const double *data )
m_windowbuf = new double[m_frameSize];
}

for (int i = 0; i < m_frameSize; ++i) {
for (unsigned int i = 0; i < m_frameSize; ++i) {
m_windowbuf[i] = data[i];
}
m_window->cut(m_windowbuf);
Expand All @@ -155,20 +155,18 @@ double* Chromagram::process( const double *real, const double *imag )
// initialise chromadata to 0
for (unsigned i = 0; i < m_BPO; i++) m_chromadata[i] = 0;

double cmax = 0.0;
double cval = 0;
// Calculate ConstantQ frame
m_ConstantQ->process( real, imag, m_CQRe, m_CQIm );

// add each octave of cq data into Chromagram
const unsigned octaves = (int)floor(double( m_uK/m_BPO))-1;
for (unsigned octave = 0; octave <= octaves; octave++)
{
unsigned firstBin = octave*m_BPO;
for (unsigned i = 0; i < m_BPO; i++)
{
m_chromadata[i] += kabs( m_CQRe[ firstBin + i ], m_CQIm[ firstBin + i ]);
}
unsigned firstBin = octave * m_BPO;
for (unsigned i = 0; i < m_BPO; i++)
{
m_chromadata[i] += kabs( m_CQRe[ firstBin + i ], m_CQIm[ firstBin + i ]);
}
}

MathUtilities::normalise(m_chromadata, m_BPO, m_normalise);
Expand Down
2 changes: 1 addition & 1 deletion lib/qm-dsp/dsp/keydetection/GetKeyMode.cpp
Expand Up @@ -185,7 +185,7 @@ int GetKeyMode::process(double *PCMData)
MathUtilities::circShift( m_ChrPointer, m_BPO, 2);
/*
std::cout << "raw chroma: ";
for (int ii = 0; ii < m_BPO; ++ii) {
for (unsigned int ii = 0; ii < m_BPO; ++ii) {
if (ii % (m_BPO/12) == 0) std::cout << "\n";
std::cout << m_ChrPointer[ii] << " ";
}
Expand Down

0 comments on commit 2c81fb9

Please sign in to comment.