Mercurial > hg > svapp
changeset 469:85e7d2418d9a 3.0-integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Fri, 24 Jul 2015 16:31:54 +0100 |
parents | 1b4e5a567d58 (diff) 45054b36ddbf (current diff) |
children | 4480b031fe38 |
files | |
diffstat | 2 files changed, 16 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp Mon Jul 13 14:39:41 2015 +0100 +++ b/audioio/AudioGenerator.cpp Fri Jul 24 16:31:54 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 Mon Jul 13 14:39:41 2015 +0100 +++ b/framework/MainWindowBase.cpp Fri Jul 24 16:31:54 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