diff options
Diffstat (limited to 'muse2/muse/plugin.cpp')
-rw-r--r-- | muse2/muse/plugin.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp index e7e5c1f8..ed3a8655 100644 --- a/muse2/muse/plugin.cpp +++ b/muse2/muse/plugin.cpp @@ -1300,7 +1300,6 @@ Plugin* PluginList::find(const QString& file, const QString& name) Pipeline::Pipeline() : std::vector<PluginI*>() { - // Added by Tim. p3.3.15 for (int i = 0; i < MAX_CHANNELS; ++i) posix_memalign((void**)(buffer + i), 16, sizeof(float) * MusEGlobal::segmentSize); @@ -1309,6 +1308,21 @@ Pipeline::Pipeline() } //--------------------------------------------------------- +// Pipeline copy constructor +//--------------------------------------------------------- + +Pipeline::Pipeline(const Pipeline& /*p*/) + : std::vector<PluginI*>() + { + for (int i = 0; i < MAX_CHANNELS; ++i) + posix_memalign((void**)(buffer + i), 16, sizeof(float) * MusEGlobal::segmentSize); + + // TODO: Copy plug-ins ! + for (int i = 0; i < PipelineDepth; ++i) + push_back(0); + } + +//--------------------------------------------------------- // ~Pipeline //--------------------------------------------------------- @@ -1316,6 +1330,7 @@ Pipeline::~Pipeline() { removeAll(); for (int i = 0; i < MAX_CHANNELS; ++i) + if(buffer[i]) ::free(buffer[i]); } |