Some (temporary) debug etc

This commit is contained in:
Chris Cannam
2022-06-09 14:16:49 +01:00
parent 022bb6d40c
commit 70a7b6d688
3 changed files with 48 additions and 2 deletions

View File

@@ -283,6 +283,16 @@ protected:
static void logCout(const std::string &message) {
std::cout << "RubberBandStretcher: " << message << std::endl;
}
//!!! dupes
int binForFrequency(double f, int fftSize) const {
return int(round(f * double(fftSize) /
m_parameters.sampleRate));
}
double frequencyForBin(int b, int fftSize) const {
return (double(b) * m_parameters.sampleRate)
/ double(fftSize);
}
};
}