diff options
author | Sampo Savolainen <v2@iki.fi> | 2007-09-25 17:54:23 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2007-09-25 17:54:23 +0000 |
commit | 555cbaf613f1aca0654ca173dce4162ef7e122f3 (patch) | |
tree | 81517275e5a4501522f4ec1af126d99e165ac311 | |
parent | 55b8ea2caec77d2f380f9ccb409a27c2ee7c8045 (diff) |
set was_activated to false when deactivate() is run and clean up the
cleanup() method
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2484 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/ardour/ladspa_plugin.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/ardour/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h index b7cca2270d..81936ab3d3 100644 --- a/libs/ardour/ardour/ladspa_plugin.h +++ b/libs/ardour/ardour/ladspa_plugin.h @@ -71,17 +71,23 @@ class LadspaPlugin : public ARDOUR::Plugin if (descriptor->activate) { descriptor->activate (handle); } + was_activated = true; } void deactivate () { if (!was_activated) return; - if (descriptor->deactivate) + if (descriptor->deactivate) { descriptor->deactivate (handle); + } + + was_activated = false; } void cleanup () { - if (was_activated && descriptor->cleanup) { + deactivate(); + + if (descriptor->cleanup) { descriptor->cleanup (handle); } } |