This is a little faster, and I can't tell the difference at first listen, nor think of a good reason why it should be worse. To be tested.
This commit is contained in:
@@ -127,27 +127,10 @@ public:
|
|||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_peakPicker.findNearestAndNextPeaks(m_prevInMag[c],
|
// m_peakPicker.findNearestAndNextPeaks(m_prevInMag[c],
|
||||||
lowest, highest - lowest + 1,
|
// lowest, highest - lowest + 1,
|
||||||
2, m_prevPeaks[c],
|
// 2, m_prevPeaks[c],
|
||||||
nullptr);
|
// nullptr);
|
||||||
|
|
||||||
/*
|
|
||||||
static int counter = 0;
|
|
||||||
if (c == 0) {
|
|
||||||
if (++counter > 140 && counter < 150) {
|
|
||||||
std::cout << "Magnitudes and peaks (fftSize = " << m_parameters.fftSize << "):" << std::endl;
|
|
||||||
for (int i = 0; i < bs; ++i) {
|
|
||||||
if (m_currentPeaks[c][i] == i) {
|
|
||||||
std::cout << "*";
|
|
||||||
}
|
|
||||||
std::cout << mag[c][i] << ", ";
|
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channels > 1) {
|
if (channels > 1) {
|
||||||
@@ -231,14 +214,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//!!! NB in the original we use a different value of p for
|
int **tmp = m_prevPeaks;
|
||||||
//!!! peak-picking the prior magnitudes - this isn't carried
|
m_prevPeaks = m_currentPeaks;
|
||||||
//!!! over here - it is now but I don't think this was the
|
m_currentPeaks = tmp;
|
||||||
//!!! full cause of our burbling
|
|
||||||
|
|
||||||
// int **tmp = m_prevPeaks;
|
|
||||||
// m_prevPeaks = m_currentPeaks;
|
|
||||||
// m_currentPeaks = tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user