mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 14:46:34 +01:00
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:
parent
8c3cdbd61e
commit
47b51a8924
1 changed files with 12 additions and 1 deletions
|
|
@ -637,9 +637,15 @@ CrossfadeEditor::redraw ()
|
||||||
|
|
||||||
for (list<Point*>::iterator i = fade[current].points.begin(); i != fade[current].points.end(); ++i) {
|
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].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();
|
size_t npoints = (size_t) effective_width();
|
||||||
float vec[npoints];
|
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_amplitude_above_axis() = 2.0;
|
||||||
waveview->property_wave_color() = color;
|
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();
|
waveview->lower_to_bottom();
|
||||||
fade[which].waves.push_back (waveview);
|
fade[which].waves.push_back (waveview);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue