Introduce global default-fade-shape configuration variable

Some users always want the same fade in/out style, e.g., constant power,
symmetric, fast etc.

To avoid having them change the fade style manually for each fade, use a
global configuration variable instead.
This commit is contained in:
Adrian Knoth 2014-03-24 13:22:49 +01:00 committed by Paul Davis
parent 12198e2d01
commit 74634b5fcc
4 changed files with 18 additions and 2 deletions

View file

@ -95,6 +95,7 @@ CONFIG_VARIABLE (bool, automation_follows_regions, "automation-follows-regions",
CONFIG_VARIABLE (bool, region_boundaries_from_selected_tracks, "region-boundaries-from-selected-tracks", true)
CONFIG_VARIABLE (bool, region_boundaries_from_onscreen_tracks, "region-boundaries-from-onscreen_tracks", true)
CONFIG_VARIABLE (bool, autoscroll_editor, "autoscroll-editor", true)
CONFIG_VARIABLE (FadeShape, default_fade_shape, "default-fade-shape", FadeLinear)
/* monitoring, mute, solo etc */

View file

@ -638,6 +638,7 @@ std::istream& operator>>(std::istream& o, ARDOUR::DenormalModel& sf);
std::istream& operator>>(std::istream& o, ARDOUR::WaveformScale& sf);
std::istream& operator>>(std::istream& o, ARDOUR::WaveformShape& sf);
std::istream& operator>>(std::istream& o, ARDOUR::PositionLockStyle& sf);
std::istream& operator>>(std::istream& o, ARDOUR::FadeShape& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::SampleFormat& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::HeaderFormat& sf);
@ -662,6 +663,7 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::DenormalModel& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformScale& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformShape& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::PositionLockStyle& sf);
std::ostream& operator<<(std::ostream& o, const ARDOUR::FadeShape& sf);
static inline ARDOUR::framepos_t
session_frame_to_track_frame (ARDOUR::framepos_t session_frame, double speed)

View file

@ -1211,14 +1211,14 @@ void
AudioRegion::set_default_fade_in ()
{
_fade_in_suspended = 0;
set_fade_in (FadeLinear, 64);
set_fade_in (Config->get_default_fade_shape(), 64);
}
void
AudioRegion::set_default_fade_out ()
{
_fade_out_suspended = 0;
set_fade_out (FadeLinear, 64);
set_fade_out (Config->get_default_fade_shape(), 64);
}
void

View file

@ -962,3 +962,16 @@ std::ostream& operator<<(std::ostream& o, const Evoral::OverlapType& var)
std::string s = enum_2_string (var);
return o << s;
}
std::istream& operator>>(std::istream& o, FadeShape& var)
{
std::string s;
o >> s;
var = (FadeShape) string_2_enum (s, var);
return o;
}
std::ostream& operator<<(std::ostream& o, const FadeShape& var)
{
std::string s = enum_2_string (var);
return o << s;
}