mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 17:03:06 +01:00
Remove unnecessary _fade_{in,out}_shape members from AudioRegion.
Copy fade in / out to new regions created by filters, which should fix 2972. git-svn-id: svn://localhost/ardour2/branches/3.0@6406 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
8e65788ef0
commit
bd231ac9bf
3 changed files with 28 additions and 6 deletions
|
|
@ -125,11 +125,13 @@ class AudioRegion : public Region
|
|||
void set_fade_in_shape (FadeShape);
|
||||
void set_fade_in_length (nframes_t);
|
||||
void set_fade_in (FadeShape, nframes_t);
|
||||
void set_fade_in (boost::shared_ptr<AutomationList>);
|
||||
|
||||
void set_fade_out_active (bool yn);
|
||||
void set_fade_out_shape (FadeShape);
|
||||
void set_fade_out_length (nframes_t);
|
||||
void set_fade_out (FadeShape, nframes_t);
|
||||
void set_fade_out (boost::shared_ptr<AutomationList>);
|
||||
|
||||
void set_envelope_active (bool yn);
|
||||
void set_default_envelope ();
|
||||
|
|
@ -206,9 +208,7 @@ class AudioRegion : public Region
|
|||
AutomatableControls _automatable;
|
||||
|
||||
boost::shared_ptr<AutomationList> _fade_in;
|
||||
FadeShape _fade_in_shape;
|
||||
boost::shared_ptr<AutomationList> _fade_out;
|
||||
FadeShape _fade_out_shape;
|
||||
boost::shared_ptr<AutomationList> _envelope;
|
||||
gain_t _scale_amplitude;
|
||||
uint32_t _fade_in_disabled;
|
||||
|
|
|
|||
|
|
@ -771,6 +771,16 @@ AudioRegion::set_fade_out_shape (FadeShape shape)
|
|||
set_fade_out (shape, (nframes_t) _fade_out->back()->when);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegion::set_fade_in (boost::shared_ptr<AutomationList> f)
|
||||
{
|
||||
_fade_in->freeze ();
|
||||
*_fade_in = *f;
|
||||
_fade_in->thaw ();
|
||||
|
||||
send_change (FadeInChanged);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegion::set_fade_in (FadeShape shape, nframes_t len)
|
||||
{
|
||||
|
|
@ -826,7 +836,16 @@ AudioRegion::set_fade_in (FadeShape shape, nframes_t len)
|
|||
}
|
||||
|
||||
_fade_in->thaw ();
|
||||
_fade_in_shape = shape;
|
||||
|
||||
send_change (FadeInChanged);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegion::set_fade_out (boost::shared_ptr<AutomationList> f)
|
||||
{
|
||||
_fade_out->freeze ();
|
||||
*_fade_out = *f;
|
||||
_fade_out->thaw ();
|
||||
|
||||
send_change (FadeInChanged);
|
||||
}
|
||||
|
|
@ -884,7 +903,6 @@ AudioRegion::set_fade_out (FadeShape shape, nframes_t len)
|
|||
}
|
||||
|
||||
_fade_out->thaw ();
|
||||
_fade_out_shape = shape;
|
||||
|
||||
send_change (FadeOutChanged);
|
||||
}
|
||||
|
|
@ -952,13 +970,13 @@ AudioRegion::set_fade_out_active (bool yn)
|
|||
bool
|
||||
AudioRegion::fade_in_is_default () const
|
||||
{
|
||||
return _fade_in_shape == Linear && _fade_in->back()->when == 64;
|
||||
return _fade_in->size() == 2 && _fade_in->front()->when == 0 && _fade_in->back()->when == 64;
|
||||
}
|
||||
|
||||
bool
|
||||
AudioRegion::fade_out_is_default () const
|
||||
{
|
||||
return _fade_out_shape == Linear && _fade_out->back()->when == 64;
|
||||
return _fade_out->size() == 2 && _fade_out->front()->when == 0 && _fade_out->back()->when == 64;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ Filter::finish (boost::shared_ptr<Region> region, SourceList& nsrcs, string regi
|
|||
boost::shared_ptr<AudioRegion> audio_r = boost::dynamic_pointer_cast<AudioRegion> (r);
|
||||
if (audio_region && audio_r) {
|
||||
audio_r->set_scale_amplitude (audio_region->scale_amplitude());
|
||||
audio_r->set_fade_in_active (audio_region->fade_in_active ());
|
||||
audio_r->set_fade_in (audio_region->fade_in ());
|
||||
audio_r->set_fade_out_active (audio_region->fade_out_active ());
|
||||
audio_r->set_fade_out (audio_region->fade_out ());
|
||||
}
|
||||
results.push_back (r);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue