comparison transform/FeatureExtractionPluginTransform.cpp @ 184:ebd906049fb6

* Change WaveFileModel API from getValues(start,end) to getData(start,count). It's much less error-prone to pass in frame counts instead of start/end locations. Should have done this ages ago. This closes #1794563. * Add option to apply a transform to only the selection region, instead of the whole audio. * (to make the above work properly) Add start frame offset to wave models
author Chris Cannam
date Mon, 01 Oct 2007 13:48:38 +0000
parents 21a76c9ed5c3
children f3191ab6d564
comparison
equal deleted inserted replaced
183:3fdaf3157eea 184:ebd906049fb6
403 size -= offset; 403 size -= offset;
404 if (size <= 0) return; 404 if (size <= 0) return;
405 startFrame = 0; 405 startFrame = 0;
406 } 406 }
407 407
408 long got = getInput()->getValues 408 long got = getInput()->getData
409 ((channelCount == 1 ? m_context.channel : channel), 409 ((channelCount == 1 ? m_context.channel : channel),
410 startFrame, startFrame + size, buffer + offset); 410 startFrame, size, buffer + offset);
411 411
412 while (got < size) { 412 while (got < size) {
413 buffer[offset + got] = 0.0; 413 buffer[offset + got] = 0.0;
414 ++got; 414 ++got;
415 } 415 }