Mercurial > hg > silvet
diff src/EM.cpp @ 88:97b77e7cb94c timing
Store templates as doubles instead of floats
author | Chris Cannam |
---|---|
date | Tue, 06 May 2014 12:49:49 +0100 |
parents | 6075e92d63ab |
children | a6e136aaa202 |
line wrap: on
line diff
--- a/src/EM.cpp Tue May 06 12:45:09 2014 +0100 +++ b/src/EM.cpp Tue May 06 12:49:49 2014 +0100 @@ -122,7 +122,7 @@ maximisation(column); } -const float * +const double * EM::templateFor(int instrument, int note, int shift) { return silvet_templates[instrument].data[note] + shift; @@ -142,7 +142,7 @@ const double pitch = m_pitches[n]; const double source = m_sources[i][n]; for (int f = 0; f < m_shiftCount; ++f) { - const float *w = templateFor(i, n, f); + const double *w = templateFor(i, n, f); const double shift = m_shifts[f][n]; const double factor = pitch * source * shift; for (int j = 0; j < m_binCount; ++j) { @@ -179,7 +179,7 @@ const double source = m_sources[i][n]; newSources[i][n] = epsilon; - const float *w = templateFor(i, n, f); + const double *w = templateFor(i, n, f); const double factor = pitch * source * shift; if (n >= m_lowestPitch && n <= m_highestPitch) {