mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 23:46:20 +01:00
Make sure we don't deactivate un-activated plugins or re-activate already activated plugins
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2480 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4c88043aef
commit
25508466da
1 changed files with 6 additions and 0 deletions
|
|
@ -65,12 +65,18 @@ class LadspaPlugin : public ARDOUR::Plugin
|
|||
std::set<uint32_t> automatable() const;
|
||||
uint32_t nth_parameter (uint32_t port, bool& ok) const;
|
||||
void activate () {
|
||||
if (was_activated)
|
||||
return;
|
||||
|
||||
if (descriptor->activate) {
|
||||
descriptor->activate (handle);
|
||||
}
|
||||
was_activated = true;
|
||||
}
|
||||
void deactivate () {
|
||||
if (!was_activated)
|
||||
return;
|
||||
|
||||
if (descriptor->deactivate)
|
||||
descriptor->deactivate (handle);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue