Make the set_state() function respect redirects already present on the route. Still...
[ardour.git] / libs / ardour / ardour / route.h
index 21638e64c25fd2dcabacab9ff8ba79a8c8e42f11..9bdd2cbca5c4b0df8e9966a9231b435fb5907a1d 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_route_h__
@@ -78,8 +77,8 @@ class Route : public IO
        std::string comment() { return _comment; }
        void set_comment (std::string str, void *src);
 
-       long order_key(std::string name) const;
-       void set_order_key (std::string name, long n);
+       long order_key (const char* name) const;
+       void set_order_key (const char* name, long n);
 
        bool hidden() const { return _flags & Hidden; }
        bool master() const { return _flags & MasterOut; }
@@ -121,6 +120,7 @@ class Route : public IO
 
        void set_mute (bool yn, void *src);
        bool muted() const { return _muted; }
+       bool solo_muted() const { return desired_solo_gain == 0.0; }
 
        void set_mute_config (mute_type, bool, void *src);
        bool get_mute_config (mute_type);
@@ -169,9 +169,9 @@ class Route : public IO
        int copy_redirects (const Route&, Placement, uint32_t* err_streams = 0);
        int sort_redirects (uint32_t* err_streams = 0);
 
-       void clear_redirects (void *src);
+       void clear_redirects (Placement, void *src);
        void all_redirects_flip();
-       void all_redirects_active (bool state);
+       void all_redirects_active (Placement, bool state);
 
        virtual nframes_t update_total_latency();
        nframes_t signal_latency() const { return _own_latency; }
@@ -248,7 +248,7 @@ class Route : public IO
        void curve_reallocate ();
 
   protected:
-       unsigned char _flags;
+       Flag _flags;
 
        /* tight cache-line access here is more important than sheer speed of
           access.
@@ -256,7 +256,6 @@ class Route : public IO
 
        bool                     _muted : 1;
        bool                     _soloed : 1;
-       bool                     _solo_muted : 1;
        bool                     _solo_safe : 1;
        bool                     _phase_invert : 1;
        bool                     _recordable : 1;
@@ -315,13 +314,23 @@ class Route : public IO
        uint32_t pans_required() const;
        uint32_t n_process_buffers ();
 
-       virtual int _set_state (const XMLNode&, bool call_base);
+       virtual int  _set_state (const XMLNode&, bool call_base);
+       virtual void _set_redirect_states (const XMLNodeList&);
 
   private:
        void init ();
 
        static uint32_t order_key_cnt;
-       typedef std::map<std::string,long> OrderKeys;
+
+       struct ltstr
+       {
+           bool operator()(const char* s1, const char* s2) const
+           {
+                   return strcmp(s1, s2) < 0;
+           }
+       };
+
+       typedef std::map<const char*,long,ltstr> OrderKeys;
        OrderKeys order_keys;
 
        void input_change_handler (IOChange, void *src);