# HG changeset patch # User Chris Cannam # Date 1161092971 0 # Node ID 963e3187d920b0d971c91dd330d641b1e22d5853 # Parent 06b3c3f437e6678f008c5f25f9086b496624c722 * Fix slowness in serving FFT values to feature extraction plugin transform (failure to call resume() on FFT model) * Fix failure to update completion from time/value model diff -r 06b3c3f437e6 -r 963e3187d920 transform/FeatureExtractionPluginTransform.cpp --- a/transform/FeatureExtractionPluginTransform.cpp Tue Oct 17 13:04:49 2006 +0000 +++ b/transform/FeatureExtractionPluginTransform.cpp Tue Oct 17 13:49:31 2006 +0000 @@ -251,14 +251,16 @@ if (frequencyDomain) { for (size_t ch = 0; ch < channelCount; ++ch) { - fftModels.push_back(new FFTModel + FFTModel *model = new FFTModel (getInput(), channelCount == 1 ? m_context.channel : ch, m_context.windowType, m_context.blockSize, m_context.stepSize, m_context.blockSize, - false)); + false); + model->resume(); + fftModels.push_back(model); } } @@ -292,15 +294,6 @@ fftModels[ch]->getValuesAt (column, i, buffers[ch][i*2], buffers[ch][i*2+1]); } -/*!!! - float sum = 0.0; - for (size_t i = 0; i < m_context.blockSize/2; ++i) { - sum += buffers[ch][i*2]; - } - if (fabs(sum) < 0.0001) { - std::cerr << "WARNING: small sum for column " << column << " (sum is " << sum << ")" << std::endl; - } -*/ } else { getFrames(ch, channelCount, blockFrame, m_context.blockSize, buffers[ch]); @@ -477,14 +470,12 @@ SparseOneDimensionalModel *model = getOutput(); if (!model) return; - std::cerr << "setting on SparseOneDimensionalModel" << std::endl; model->setCompletion(completion); } else if (binCount == 1) { SparseTimeValueModel *model = getOutput(); if (!model) return; - std::cerr << "setting on SparseTimeValueModel" << std::endl; model->setCompletion(completion); } else if (m_descriptor->sampleType == @@ -492,7 +483,6 @@ NoteModel *model = getOutput(); if (!model) return; - std::cerr << "setting on NoteModel" << std::endl; model->setCompletion(completion); } else { @@ -500,7 +490,6 @@ EditableDenseThreeDimensionalModel *model = getOutput(); if (!model) return; - std::cerr << "setting on EditableDenseThreeDimensionalModel" << std::endl; model->setCompletion(completion); } }