Mercurial > hg > svapp
changeset 462:83370e830c95 3.0-integration
Merge from branch simple-fft-model
author | Chris Cannam |
---|---|
date | Fri, 26 Jun 2015 14:14:31 +0100 |
parents | 3485d324c172 (current diff) 1020db1698c0 (diff) |
children | 1b4e5a567d58 |
files | |
diffstat | 2 files changed, 16 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp Wed Jun 10 17:06:02 2015 +0100 +++ b/audioio/AudioGenerator.cpp Fri Jun 26 14:14:31 2015 +0100 @@ -439,17 +439,20 @@ sv_frame_t got = 0; if (startFrame >= fadeIn/2) { - got = dtvm->getMultiChannelData(0, modelChannels - 1, - startFrame - fadeIn/2, - frames + fadeOut/2 + fadeIn/2, - m_channelBuffer); + + auto data = dtvm->getMultiChannelData(0, modelChannels - 1, + startFrame - fadeIn/2, + frames + fadeOut/2 + fadeIn/2); + + for (int c = 0; c < modelChannels; ++c) { + copy(data[c].begin(), data[c].end(), m_channelBuffer[c]); + } + + got = data[0].size(); + } else { sv_frame_t missing = fadeIn/2 - startFrame; - for (int c = 0; c < modelChannels; ++c) { - m_channelBuffer[c] += missing; - } - if (missing > 0) { cerr << "note: channelBufSiz = " << m_channelBufSiz << ", frames + fadeOut/2 = " << frames + fadeOut/2 @@ -457,16 +460,14 @@ << ", missing = " << missing << endl; } - got = dtvm->getMultiChannelData(0, modelChannels - 1, - startFrame, - frames + fadeOut/2, - m_channelBuffer); - + auto data = dtvm->getMultiChannelData(0, modelChannels - 1, + startFrame, + frames + fadeOut/2); for (int c = 0; c < modelChannels; ++c) { - m_channelBuffer[c] -= missing; + copy(data[c].begin(), data[c].end(), m_channelBuffer[c] + missing); } - got += missing; + got = data[0].size() + missing; } for (int c = 0; c < m_targetChannelCount; ++c) {
--- a/framework/MainWindowBase.cpp Wed Jun 10 17:06:02 2015 +0100 +++ b/framework/MainWindowBase.cpp Fri Jun 26 14:14:31 2015 +0100 @@ -60,8 +60,6 @@ #include "data/fileio/AudioFileReaderFactory.h" #include "rdf/RDFImporter.h" -#include "data/fft/FFTDataServer.h" - #include "base/RecentFiles.h" #include "base/PlayParameterRepository.h" @@ -3339,7 +3337,6 @@ m_viewManager->setPlaybackModel(0); } m_playSource->removeModel(model); - FFTDataServer::modelAboutToBeDeleted(model); } void