13
0

Flush Audioregion local [fx] cache when changing region gain

This commit is contained in:
Robin Gareus 2024-05-02 22:50:56 +02:00
parent 27e2348b47
commit 37d24eee7d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 23 additions and 1 deletions

View File

@ -279,6 +279,7 @@ class LIBARDOUR_API AudioRegion : public Region, public AudioReadable
bool _add_plugin (std::shared_ptr<RegionFxPlugin>, std::shared_ptr<RegionFxPlugin>, bool);
int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal);
void send_change (const PBD::PropertyChange&);
};
} /* namespace ARDOUR */

View File

@ -565,7 +565,7 @@ protected:
virtual bool _add_plugin (std::shared_ptr<RegionFxPlugin>, std::shared_ptr<RegionFxPlugin>, bool) { return false; }
virtual void fx_latency_changed (bool no_emit);
void send_change (const PBD::PropertyChange&);
virtual void send_change (const PBD::PropertyChange&);
virtual int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal);
virtual void set_position_internal (timepos_t const & pos);
virtual void set_length_internal (timecnt_t const &);

View File

@ -251,6 +251,27 @@ AudioRegion::init ()
_fx_latent_read = false;
}
void
AudioRegion::send_change (const PropertyChange& what_changed)
{
PropertyChange our_interests;
our_interests.add (Properties::fade_in_active);
our_interests.add (Properties::fade_out_active);
our_interests.add (Properties::scale_amplitude);
our_interests.add (Properties::envelope_active);
our_interests.add (Properties::envelope);
our_interests.add (Properties::fade_in);
our_interests.add (Properties::fade_out);
if (what_changed.contains (our_interests)) {
_invalidated.exchange (true);
}
Region::send_change (what_changed);
}
void
AudioRegion::copy_plugin_state (std::shared_ptr<const AudioRegion> other)
{