* Separate out analysis and synthesis window sizes from FFT size.

This is an internal change only, so far -- results should be
  unchanged from 1.5.0.
This commit is contained in:
Chris Cannam
2010-05-16 10:44:38 +01:00
parent 8b3a5e4979
commit 3ed58ba356
16 changed files with 285 additions and 281 deletions

View File

@@ -26,7 +26,7 @@ namespace RubberBand
PercussiveAudioCurve::PercussiveAudioCurve(Parameters parameters) :
AudioCurveCalculator(parameters)
{
m_prevMag = allocate_and_zero<double>(m_windowSize/2 + 1);
m_prevMag = allocate_and_zero<double>(m_fftSize/2 + 1);
}
PercussiveAudioCurve::~PercussiveAudioCurve()
@@ -37,14 +37,14 @@ PercussiveAudioCurve::~PercussiveAudioCurve()
void
PercussiveAudioCurve::reset()
{
v_zero(m_prevMag, m_windowSize/2 + 1);
v_zero(m_prevMag, m_fftSize/2 + 1);
}
void
PercussiveAudioCurve::setWindowSize(int newSize)
PercussiveAudioCurve::setFftSize(int newSize)
{
m_prevMag = reallocate(m_prevMag, m_windowSize, newSize);
AudioCurveCalculator::setWindowSize(newSize);
m_prevMag = reallocate(m_prevMag, m_fftSize, newSize);
AudioCurveCalculator::setFftSize(newSize);
reset();
}