Mercurial > hg > svapp
changeset 499:a4d90cf2bb79 3.0-integration
Merge from recording branch
author | Chris Cannam |
---|---|
date | Mon, 12 Oct 2015 12:43:06 +0100 |
parents | 111e976f9ed4 (diff) cd9dec2f47e8 (current diff) |
children | dcd2afbc1bb7 |
files | framework/MainWindowBase.cpp |
diffstat | 2 files changed, 16 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/audio/AudioGenerator.cpp Tue Sep 22 17:12:37 2015 +0100 +++ b/audio/AudioGenerator.cpp Mon Oct 12 12:43:06 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 Tue Sep 22 17:12:37 2015 +0100 +++ b/framework/MainWindowBase.cpp Mon Oct 12 12:43:06 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" @@ -3518,7 +3516,6 @@ m_viewManager->setPlaybackModel(0); } m_playSource->removeModel(model); - FFTDataServer::modelAboutToBeDeleted(model); } void