clear all solo state should affect VCAs too
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 21 Apr 2016 15:08:47 +0000 (11:08 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:41 +0000 (15:30 -0400)
libs/ardour/ardour/vca.h
libs/ardour/ardour/vca_manager.h
libs/ardour/session.cc
libs/ardour/session_rtevents.cc
libs/ardour/vca.cc
libs/ardour/vca_manager.cc

index 38fba07bc7da8068398a254f829ed0b0912d14ed..9af6436f6bc1c1dbe004a331f30ef5028497a84a 100644 (file)
@@ -51,6 +51,8 @@ class LIBARDOUR_API VCA : public Stripable, public Soloable, public Muteable, pu
        XMLNode& get_state();
        int set_state (XMLNode const&, int version);
 
+       void clear_all_solo_state ();
+
        bool soloed () const;
        void push_solo_upstream (int32_t) {}
        void push_solo_isolate_upstream (int32_t) {}
index c51336b55857553b786f93f0e8399aea57ff162d..d18044a8dfc9205602aeb07430919c4dd651aa90 100644 (file)
@@ -58,6 +58,7 @@ class VCAManager : public SessionHandleRef, public PBD::StatefulDestructible
        int set_state (XMLNode const&, int version);
 
        bool vcas_loaded() const { return _vcas_loaded; }
+       void clear_all_solo_state ();
 
        static std::string xml_node_name;
 
index f706dd00ee977d54702f7344ed66eeeaba743e13..55cd1f9ae829df570ff3704c46e15c92344140bc 100644 (file)
 #include "ardour/user_bundle.h"
 #include "ardour/utils.h"
 #include "ardour/vca_manager.h"
+#include "ardour/vca.h"
 
 #include "midi++/port.h"
 #include "midi++/mmc.h"
@@ -324,6 +325,7 @@ Session::Session (AudioEngine &eng,
        pthread_cond_init (&_auto_connect_cond, 0);
 
        init_name_id_counter (1); // reset for new sessions, start at 1
+       VCA::set_next_vca_number (1); // reset for new sessions, start at 1
 
        pre_engine_init (fullpath);
 
index 67249d48b9482d0f0751bf0f1c94512e578f2864..3c905299b8732bb097e6c7677c3f50ba868ecf39 100644 (file)
@@ -25,6 +25,7 @@
 #include "ardour/route.h"
 #include "ardour/session.h"
 #include "ardour/track.h"
+#include "ardour/vca_manager.h"
 
 #include "i18n.h"
 
@@ -71,6 +72,9 @@ Session::rt_clear_all_solo_state (boost::shared_ptr<RouteList> rl, bool /* yn */
                }
                (*i)->clear_all_solo_state();
        }
+
+       _vca_manager->clear_all_solo_state ();
+
        set_dirty();
 }
 
index f746da8ff38f297d06ebfd582b419494a3422a80..0e33dca6e2b15734265efd593168dbed87289522 100644 (file)
@@ -146,3 +146,9 @@ VCA::set_state (XMLNode const& node, int version)
 
        return 0;
 }
+
+void
+VCA::clear_all_solo_state ()
+{
+       _solo_control->clear_all_solo_state ();
+}
index 6cc287554afd035b1bf9feb49fa6ee3fe37a129c..d7ad6ea851fbf11c2d2874806f9a1f3f9c0cb38a 100644 (file)
@@ -177,3 +177,13 @@ VCAManager::set_state (XMLNode const& node, int version)
 
        return 0;
 }
+
+void
+VCAManager::clear_all_solo_state ()
+{
+       Mutex::Lock lm (lock);
+
+       for (VCAList::const_iterator i = _vcas.begin(); i != _vcas.end(); ++i) {
+               (*i)->clear_all_solo_state ();
+       }
+}