comparison audioio/AudioGenerator.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 98ba77e0d897
children f3191ab6d564
comparison
equal deleted inserted replaced
183:3fdaf3157eea 184:ebd906049fb6
356 void 356 void
357 AudioGenerator::setSoloModelSet(std::set<Model *> s) 357 AudioGenerator::setSoloModelSet(std::set<Model *> s)
358 { 358 {
359 QMutexLocker locker(&m_mutex); 359 QMutexLocker locker(&m_mutex);
360 360
361 std::cerr << "setting solo set" << std::endl;
362
363 m_soloModelSet = s; 361 m_soloModelSet = s;
364 m_soloing = true; 362 m_soloing = true;
365 } 363 }
366 364
367 void 365 void
465 } 463 }
466 } 464 }
467 465
468 if (prevChannel != sourceChannel) { 466 if (prevChannel != sourceChannel) {
469 if (startFrame >= fadeIn/2) { 467 if (startFrame >= fadeIn/2) {
470 got = dtvm->getValues 468 got = dtvm->getData
471 (sourceChannel, 469 (sourceChannel,
472 startFrame - fadeIn/2, startFrame + frames + fadeOut/2, 470 startFrame - fadeIn/2,
471 frames + fadeOut/2 + fadeIn/2,
473 channelBuffer); 472 channelBuffer);
474 } else { 473 } else {
475 size_t missing = fadeIn/2 - startFrame; 474 size_t missing = fadeIn/2 - startFrame;
476 got = dtvm->getValues 475 got = dtvm->getData
477 (sourceChannel, 476 (sourceChannel,
478 0, startFrame + frames + fadeOut/2, 477 startFrame,
478 frames + fadeOut/2,
479 channelBuffer + missing); 479 channelBuffer + missing);
480 } 480 }
481 } 481 }
482 prevChannel = sourceChannel; 482 prevChannel = sourceChannel;
483 483