void
AudioRegionView::reset_fade_in_shape ()
{
- reset_fade_in_shape_width ((framecnt_t) audio_region()->fade_in()->back()->when);
+ reset_fade_in_shape_width (audio_region(), (framecnt_t) audio_region()->fade_in()->back()->when);
}
void
-AudioRegionView::reset_fade_in_shape_width (framecnt_t width)
+AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, framecnt_t width)
{
- redraw_start_xfade ();
-
if (fade_in_handle == 0) {
return;
}
if (frame_handle_start) {
frame_handle_start->raise_to_top();
}
+
+ redraw_start_xfade_to ( ar, width);
+
}
void
AudioRegionView::reset_fade_out_shape ()
{
- reset_fade_out_shape_width ((framecnt_t) audio_region()->fade_out()->back()->when);
+ reset_fade_out_shape_width (audio_region(), (framecnt_t) audio_region()->fade_out()->back()->when);
}
void
-AudioRegionView::reset_fade_out_shape_width (framecnt_t width)
+AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar, framecnt_t width)
{
- redraw_end_xfade ();
-
if (fade_out_handle == 0) {
return;
}
if (frame_handle_end) {
frame_handle_end->raise_to_top();
}
+
+ redraw_end_xfade_to (ar, width);
}
framepos_t
if (!start_xfade_out) {
start_xfade_out = new ArdourCanvas::Line (*group);
start_xfade_out->property_width_pixels() = 1;
- uint32_t col = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 255);
+ uint32_t col = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 128);
start_xfade_out->property_fill_color_rgba() = col;
}
if (!end_xfade_out) {
end_xfade_out = new ArdourCanvas::Line (*group);
end_xfade_out->property_width_pixels() = 1;
- uint32_t col UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 255);
+ uint32_t col UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 128);
end_xfade_out->property_fill_color_rgba() = col;
}
GhostRegion* add_ghost (TimeAxisView&);
- void reset_fade_in_shape_width (framecnt_t);
- void reset_fade_out_shape_width (framecnt_t);
+ void reset_fade_in_shape_width (boost::shared_ptr<ARDOUR::AudioRegion> ar, framecnt_t);
+ void reset_fade_out_shape_width (boost::shared_ptr<ARDOUR::AudioRegion> ar, framecnt_t);
framepos_t get_fade_in_shape_width ();
framepos_t get_fade_out_shape_width ();
len = ar->fade_in()->back()->when;
new_length = len - _editor->unit_to_frame (distance);
new_length = ar->verify_xfade_bounds (new_length, true /*START*/ );
- arv->reset_fade_in_shape_width (new_length); //the grey shape
- arv->redraw_start_xfade_to (ar, new_length); //the green lines & blue rect
+ arv->reset_fade_in_shape_width (ar, new_length); //the grey shape
}
}
}
len = ar->fade_out()->back()->when;
new_length = len - _editor->unit_to_frame (distance);
new_length = ar->verify_xfade_bounds (new_length, false /*END*/ );
- arv->reset_fade_out_shape_width (new_length); //the grey shape
- arv->redraw_end_xfade_to (ar, new_length); //the green lines & blue rect (must do this after)
+ arv->reset_fade_out_shape_width (ar, new_length); //the grey shape
}
}
}
continue;
}
- tmp->reset_fade_in_shape_width (fade_length);
- boost::shared_ptr<AudioRegion> ar (tmp->audio_region());
- tmp->redraw_start_xfade_to (ar, fade_length);
+ tmp->reset_fade_in_shape_width (tmp->audio_region(), fade_length);
}
show_verbose_cursor_duration (region->position(), region->position() + fade_length, 32);
continue;
}
- tmp->reset_fade_in_shape_width (tmp->audio_region()->fade_in()->back()->when);
+ tmp->reset_fade_in_shape_width (tmp->audio_region(), tmp->audio_region()->fade_in()->back()->when);
}
}
continue;
}
- tmp->reset_fade_out_shape_width (fade_length);
- boost::shared_ptr<AudioRegion> ar (tmp->audio_region());
- tmp->redraw_end_xfade_to (ar, fade_length);
+ tmp->reset_fade_out_shape_width (tmp->audio_region(), fade_length);
}
show_verbose_cursor_duration (region->last_frame() - fade_length, region->last_frame());
continue;
}
- tmp->reset_fade_out_shape_width (tmp->audio_region()->fade_out()->back()->when);
+ tmp->reset_fade_out_shape_width (tmp->audio_region(), tmp->audio_region()->fade_out()->back()->when);
}
}
sigc::mem_fun (*_session_config, &SessionConfiguration::set_xfade_choice)
);
- cfc->add (ConstantPowerMinus3dB, _("constant power (-3dB)"));
- cfc->add (ConstantPowerMinus6dB, _("constant power (-6dB)"));
- cfc->add (RegionFades, _("use existing region fade shape"));
+ cfc->add (ConstantPowerMinus3dB, _("Constant power (-3dB) crossfade"));
+ cfc->add (ConstantPowerMinus6dB, _("Linear (-6dB) crossfade"));
add_option (_("Fades"), cfc);