summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_playlist.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-10-20 21:17:25 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-10-20 21:17:25 +0000
commitfb917cff45c95f6cdc5705d411de7cd18e466d60 (patch)
tree759a28c44b3bf73f23a90a771ea81187087b4560 /libs/ardour/audio_playlist.cc
parent00ddd099ed5cd6e0d77448670381d13d88b96218 (diff)
remove absurd internal Crossfade constructor that confused region start and region position; set position explicitly in the two places that we use these crossfades; revert to the assert that caught this crazy error
git-svn-id: svn://localhost/ardour2/branches/3.0@10259 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_playlist.cc')
-rw-r--r--libs/ardour/audio_playlist.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index af075608ad..094191084d 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -311,12 +311,14 @@ AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, fr
DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("Checking %1 xfades\n", _crossfades.size()));
for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) {
- DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("%1 check xfade between %2 and %3 ...\n",
- name(), (*i)->out()->name(), (*i)->in()->name()));
+ DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("%1 check xfade between %2 and %3 ... [ %4 ... %5 | %6 ... %7]\n",
+ name(), (*i)->out()->name(), (*i)->in()->name(),
+ (*i)->first_frame(), (*i)->last_frame(),
+ start, end));
if ((*i)->coverage (start, end) != OverlapNone) {
relevant_xfades[(*i)->upper_layer()].push_back (*i);
- DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("\t\txfade is relevant, place on layer %1\n",
- (*i)->upper_layer()));
+ DEBUG_TRACE (DEBUG::AudioPlayback, string_compose ("\t\txfade is relevant (coverage = %2), place on layer %1\n",
+ (*i)->upper_layer(), enum_2_string ((*i)->coverage (start, end))));
}
}
@@ -579,7 +581,8 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh)
if (top_region_at (top->first_frame()) == top) {
- xfade = boost::shared_ptr<Crossfade> (new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn));
+ xfade = boost::shared_ptr<Crossfade> (new Crossfade (top, bottom, xfade_length, StartOfIn));
+ xfade->set_position (top->first_frame());
add_crossfade (xfade);
}
@@ -590,7 +593,8 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh)
would cover it).
*/
- xfade = boost::shared_ptr<Crossfade> (new Crossfade (bottom, top, xfade_length, top->last_frame() - xfade_length, EndOfOut));
+ xfade = boost::shared_ptr<Crossfade> (new Crossfade (bottom, top, xfade_length, EndOfOut));
+ xfade->set_position (top->last_frame() - xfade_length);
add_crossfade (xfade);
}
break;