Mercurial > hg > svcore
comparison transform/FeatureExtractionPluginTransform.cpp @ 64:4d59dc469b0f
* Ensure plugin parameters for a transform are saved in the .sv file and
restored in case the plugin has to be run again
* Make plugin dialog offer options for mixdown/single-channel use if the
file has more than one channels but the plugin only accepts one
* Fix incorrect samplerate playback for second file loaded if its samplerate
differed from first
* Add Zoom to Fit and Select Visible Range menu options, split out Import
Audio into main model and secondary model options
* Add stubs for cut, copy and paste operations (not implemented yet)
author | Chris Cannam |
---|---|
date | Thu, 30 Mar 2006 13:18:11 +0000 |
parents | ba405e5e69d3 |
children | 7afcfe666910 |
comparison
equal
deleted
inserted
replaced
63:ba405e5e69d3 | 64:4d59dc469b0f |
---|---|
27 | 27 |
28 #include <iostream> | 28 #include <iostream> |
29 | 29 |
30 FeatureExtractionPluginTransform::FeatureExtractionPluginTransform(Model *inputModel, | 30 FeatureExtractionPluginTransform::FeatureExtractionPluginTransform(Model *inputModel, |
31 QString pluginId, | 31 QString pluginId, |
32 int channel, | |
32 QString configurationXml, | 33 QString configurationXml, |
33 QString outputName) : | 34 QString outputName) : |
34 Transform(inputModel), | 35 Transform(inputModel), |
35 m_plugin(0), | 36 m_plugin(0), |
37 m_channel(channel), | |
36 m_descriptor(0), | 38 m_descriptor(0), |
37 m_outputFeatureNo(0) | 39 m_outputFeatureNo(0) |
38 { | 40 { |
39 std::cerr << "FeatureExtractionPluginTransform::FeatureExtractionPluginTransform: plugin " << pluginId.toStdString() << ", outputName " << outputName.toStdString() << std::endl; | 41 std::cerr << "FeatureExtractionPluginTransform::FeatureExtractionPluginTransform: plugin " << pluginId.toStdString() << ", outputName " << outputName.toStdString() << std::endl; |
40 | 42 |
221 | 223 |
222 size_t got = 0; | 224 size_t got = 0; |
223 | 225 |
224 if (channelCount == 1) { | 226 if (channelCount == 1) { |
225 got = input->getValues | 227 got = input->getValues |
226 (-1, blockFrame, blockFrame + blockSize, buffers[0]); | 228 (m_channel, blockFrame, blockFrame + blockSize, buffers[0]); |
227 while (got < blockSize) { | 229 while (got < blockSize) { |
228 buffers[0][got++] = 0.0; | 230 buffers[0][got++] = 0.0; |
229 } | 231 } |
230 } else { | 232 } else { |
231 for (size_t ch = 0; ch < channelCount; ++ch) { | 233 for (size_t ch = 0; ch < channelCount; ++ch) { |