More reset tests, tighten up reset logic
This commit is contained in:
@@ -92,6 +92,17 @@ public:
|
||||
|
||||
void reset()
|
||||
{
|
||||
while (m_vfQueue.getReadSpace() > 0) {
|
||||
process_t *entry = m_vfQueue.readOne();
|
||||
deallocate(entry);
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_parameters.horizontalFilterLag; ++i) {
|
||||
process_t *entry =
|
||||
allocate_and_zero<process_t>(m_parameters.binCount);
|
||||
m_vfQueue.write(&entry, 1);
|
||||
}
|
||||
|
||||
m_hFilters->reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -533,6 +533,7 @@ void
|
||||
R3Stretcher::reset()
|
||||
{
|
||||
m_calculator->reset();
|
||||
|
||||
if (m_resampler) {
|
||||
m_resampler->reset();
|
||||
}
|
||||
@@ -545,6 +546,7 @@ R3Stretcher::reset()
|
||||
cd->reset();
|
||||
}
|
||||
|
||||
m_unityCount = 0;
|
||||
m_studyInputDuration = 0;
|
||||
m_suppliedInputDuration = 0;
|
||||
m_totalTargetDuration = 0;
|
||||
|
||||
@@ -172,6 +172,7 @@ protected:
|
||||
|
||||
void reset() {
|
||||
v_zero(prevMag.data(), prevMag.size());
|
||||
v_zero(pendingKick.data(), pendingKick.size());
|
||||
v_zero(accumulator.data(), accumulator.size());
|
||||
accumulatorFill = 0;
|
||||
}
|
||||
@@ -226,7 +227,7 @@ protected:
|
||||
std::unique_ptr<FormantData> formant;
|
||||
ChannelData(BinSegmenter::Parameters segmenterParameters,
|
||||
BinClassifier::Parameters classifierParameters,
|
||||
int longestFftSize,
|
||||
int /*!!! longestFftSize */,
|
||||
int windowSourceSize,
|
||||
int inRingBufferSize,
|
||||
int outRingBufferSize) :
|
||||
@@ -252,6 +253,9 @@ protected:
|
||||
segmentation = BinSegmenter::Segmentation();
|
||||
prevSegmentation = BinSegmenter::Segmentation();
|
||||
nextSegmentation = BinSegmenter::Segmentation();
|
||||
for (size_t i = 0; i < nextClassification.size(); ++i) {
|
||||
nextClassification[i] = BinClassifier::Classification::Residual;
|
||||
}
|
||||
inbuf->reset();
|
||||
outbuf->reset();
|
||||
for (auto &s : scales) {
|
||||
|
||||
Reference in New Issue
Block a user