X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fardour%2Fcrossfade.cc;h=fd59982f6200fb17745a625c50a9883c54f62e2b;hb=7d96960b162d25da87c388a3083775e8770bba56;hp=fb4325865c0dcf11702b64d5a8955f31e1f8c08b;hpb=b5ec66ae6cb60fa43c343d3d29340b2370d0b9d1;p=ardour.git diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc index fb4325865c..fd59982f62 100644 --- a/libs/ardour/crossfade.cc +++ b/libs/ardour/crossfade.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2003-2006 Paul Davis + Copyright (C) 2003-2006 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,18 +17,17 @@ */ -#include -#include +#include "pbd/stacktrace.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include "ardour/types.h" +#include "ardour/crossfade.h" +#include "ardour/crossfade_compare.h" +#include "ardour/audioregion.h" +#include "ardour/playlist.h" +#include "ardour/utils.h" +#include "ardour/session.h" +#include "ardour/source.h" #include "i18n.h" #include @@ -51,15 +50,11 @@ Sample* Crossfade::crossfade_buffer_in = 0; void Crossfade::set_buffer_size (nframes_t sz) { - if (crossfade_buffer_out) { - delete [] crossfade_buffer_out; - crossfade_buffer_out = 0; - } + delete [] crossfade_buffer_out; + crossfade_buffer_out = 0; - if (crossfade_buffer_in) { - delete [] crossfade_buffer_in; - crossfade_buffer_in = 0; - } + delete [] crossfade_buffer_in; + crossfade_buffer_in = 0; if (sz) { crossfade_buffer_out = new Sample[sz]; @@ -73,11 +68,11 @@ Crossfade::operator== (const Crossfade& other) return (_in == other._in) && (_out == other._out); } -Crossfade::Crossfade (boost::shared_ptr in, boost::shared_ptr out, +Crossfade::Crossfade (boost::shared_ptr in, boost::shared_ptr out, nframes_t length, nframes_t position, AnchorPoint ap) - : AudioRegion (in->session(), position, length, "foobar"), + : AudioRegion (in->session(), position, length, in->name() + string ("<>") + out->name()), _fade_in (Evoral::Parameter(FadeInAutomation)), // linear (gain coefficient) => -inf..+6dB _fade_out (Evoral::Parameter(FadeOutAutomation)) // linear (gain coefficient) => -inf..+6dB @@ -87,19 +82,20 @@ Crossfade::Crossfade (boost::shared_ptr in, boost::shared_ptr