Wire through debug level changes; tidy
This commit is contained in:
@@ -119,10 +119,12 @@ public:
|
||||
{
|
||||
double rate = m_parameters.sampleRate;
|
||||
|
||||
m_log.log(1, "Guide: rate", rate);
|
||||
|
||||
int bandFftSize = roundUp(int(ceil(rate/16.0)));
|
||||
m_configuration.fftBandLimits[0] =
|
||||
BandLimits(bandFftSize, rate, 0.0, m_maxLower);
|
||||
|
||||
|
||||
// This is the classification and fallback FFT: we need it to
|
||||
// go up to Nyquist so we can seamlessly switch to it for
|
||||
// longer stretches
|
||||
@@ -133,6 +135,9 @@ public:
|
||||
bandFftSize = roundUp(int(ceil(rate/64.0)));
|
||||
m_configuration.fftBandLimits[2] =
|
||||
BandLimits(bandFftSize, rate, m_minHigher, rate/2.0);
|
||||
|
||||
m_log.log(1, "Guide: classification FFT size",
|
||||
m_configuration.classificationFftSize);
|
||||
}
|
||||
|
||||
const Configuration &getConfiguration() const {
|
||||
@@ -331,6 +336,10 @@ public:
|
||||
*/
|
||||
}
|
||||
|
||||
void setDebugLevel(int level) {
|
||||
m_log.setDebugLevel(level);
|
||||
}
|
||||
|
||||
protected:
|
||||
Parameters m_parameters;
|
||||
Log m_log;
|
||||
|
||||
@@ -111,17 +111,17 @@ public:
|
||||
int highest = configuration.fftBandLimits[myFftBand].b1max;
|
||||
|
||||
if (m_log.getDebugLevel() > 0 && !m_reported) {
|
||||
std::ostringstream ostr;
|
||||
ostr << "PhaseAdvance: fftSize = " << m_parameters.fftSize
|
||||
<< ": bins = " << bs << ", channels = " << channels
|
||||
<< ", inhop = "<< inhop << ", outhop = " << outhop
|
||||
<< ", ratio = " << ratio << std::endl;
|
||||
ostr << "PhaseAdvance: lowest possible bin = " << lowest
|
||||
<< " (" << configuration.fftBandLimits[myFftBand].f0min
|
||||
<< "Hz), highest = " << highest
|
||||
<< " (" << configuration.fftBandLimits[myFftBand].f1max
|
||||
<< "Hz)" << std::endl;
|
||||
m_log.log(1, ostr.str().c_str());
|
||||
m_log.log(1, "PhaseAdvance: for fftSize and bins",
|
||||
m_parameters.fftSize, bs);
|
||||
m_log.log(1, "PhaseAdvance: channels", channels);
|
||||
m_log.log(1, "PhaseAdvance: widest bin range for this size",
|
||||
lowest, highest);
|
||||
m_log.log(1, "PhaseAdvance: widest freq range for this size",
|
||||
configuration.fftBandLimits[myFftBand].f0min,
|
||||
configuration.fftBandLimits[myFftBand].f1max);
|
||||
m_log.log(1, "PhaseAdvance: initial inhop and outhop",
|
||||
inhop, outhop);
|
||||
m_log.log(1, "PhaseAdvance: initial ratio", ratio);
|
||||
m_reported = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,11 @@ R3Stretcher::R3Stretcher(Parameters parameters,
|
||||
m_totalOutputDuration(0),
|
||||
m_mode(ProcessMode::JustCreated)
|
||||
{
|
||||
m_log.log(1, "R3Stretcher::R3Stretcher: rate, options",
|
||||
m_parameters.sampleRate, m_parameters.options);
|
||||
m_log.log(1, "R3Stretcher::R3Stretcher: initial time ratio and pitch scale",
|
||||
m_timeRatio, m_pitchScale);
|
||||
|
||||
double maxClassifierFrequency = 16000.0;
|
||||
if (maxClassifierFrequency > m_parameters.sampleRate/2) {
|
||||
maxClassifierFrequency = m_parameters.sampleRate/2;
|
||||
|
||||
@@ -88,7 +88,12 @@ public:
|
||||
size_t getChannelCount() const;
|
||||
|
||||
void setDebugLevel(int level) {
|
||||
m_log.setDebugLevel(level); //!!! +others
|
||||
m_log.setDebugLevel(level);
|
||||
for (auto &sd : m_scaleData) {
|
||||
sd.second->guided.setDebugLevel(level);
|
||||
}
|
||||
m_guide.setDebugLevel(level);
|
||||
m_calculator->setDebugLevel(level);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user