Mercurial > hg > sonic-visualiser
diff main/MainWindow.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 |
line wrap: on
line diff
--- a/main/MainWindow.cpp Sat Sep 29 10:58:31 2007 +0000 +++ b/main/MainWindow.cpp Mon Oct 01 13:48:38 2007 +0000 @@ -2022,7 +2022,9 @@ m_viewManager->setPlaySoloMode(!m_viewManager->getPlaySoloMode()); } - if (!m_viewManager->getPlaySoloMode()) { + if (m_viewManager->getPlaySoloMode()) { + currentPaneChanged(m_paneStack->getCurrentPane()); + } else { m_viewManager->setPlaybackModel(0); if (m_playSource) { m_playSource->clearSoloModelSet(); @@ -4216,11 +4218,19 @@ std::vector<Model *> candidateInputModels = m_document->getTransformInputModels(); + size_t startFrame = 0, duration = 0; + size_t endFrame = 0; + m_viewManager->getSelection().getExtents(startFrame, endFrame); + if (endFrame > startFrame) duration = endFrame - startFrame; + else startFrame = 0; + Model *inputModel = factory->getConfigurationForTransform(transform, candidateInputModels, context, configurationXml, - m_playSource); + m_playSource, + startFrame, + duration); if (!inputModel) return; // std::cerr << "MainWindow::addLayer: Input model is " << inputModel << " \"" << inputModel->objectName().toStdString() << "\"" << std::endl;