fix waveview display on the crossfade editor

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2751 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Ben Loftis 2007-12-07 16:32:02 +00:00
parent 8c3cdbd61e
commit 47b51a8924

View file

@ -637,9 +637,15 @@ CrossfadeEditor::redraw ()
for (list<Point*>::iterator i = fade[current].points.begin(); i != fade[current].points.end(); ++i) {
fade[current].normative_curve.add ((*i)->x, (*i)->y);
fade[current].gain_curve.add (((*i)->x * len), (*i)->y);
double offset;
if (current==In)
offset = xfade->in()->start();
else
offset = xfade->out()->start()+xfade->out()->length()-xfade->length();
fade[current].gain_curve.add (((*i)->x * len) + offset, (*i)->y);
}
size_t npoints = (size_t) effective_width();
float vec[npoints];
@ -1080,6 +1086,11 @@ CrossfadeEditor::make_waves (boost::shared_ptr<AudioRegion> region, WhichFade wh
waveview->property_amplitude_above_axis() = 2.0;
waveview->property_wave_color() = color;
if (which==In)
waveview->property_region_start() = region->start();
else
waveview->property_region_start() = region->start()+region->length()-xfade->length();
waveview->lower_to_bottom();
fade[which].waves.push_back (waveview);
}