# HG changeset patch # User Chris Cannam # Date 1444650186 -3600 # Node ID a4d90cf2bb79a896d7a967e8fec5ffeeae6266bc # Parent 111e976f9ed4cc78e552fa55a62b7532e5eb834d# Parent cd9dec2f47e8cbf6acb35e8776681d22fdeff7f1 Merge from recording branch diff -r cd9dec2f47e8 -r a4d90cf2bb79 audio/AudioGenerator.cpp --- 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) { diff -r cd9dec2f47e8 -r a4d90cf2bb79 framework/MainWindowBase.cpp --- 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