Remove unused Session::butler_mixdown_buffer and Session::butler_gain_buffer.
[ardour.git] / libs / ardour / ardour / session.h
index 2be7e418dc26ff79278551f712310fb2e4114e93..0e543462aef36b4b1992e351e1fb85ef28a0e6ad 100644 (file)
@@ -178,7 +178,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
                std::list<AudioRange> audio_range;
                std::list<MusicRange> music_range;
-               
+
                boost::shared_ptr<Region> region;
 
                Event(Type t, Action a, nframes_t when, nframes_t where, double spd, bool yn = false)
@@ -206,11 +206,11 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
                        return e1->before (*e2);
                }
 
-               void *operator new (size_t ignored) {
+               void *operator new (size_t) {
                        return pool.alloc ();
                }
 
-               void operator delete(void *ptr, size_t size) {
+               void operator delete (void *ptr, size_t /*size*/) {
                        pool.release (ptr);
                }
 
@@ -223,15 +223,15 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        /* creating from an XML file */
 
        Session (AudioEngine&,
-                       const std::string& fullpath,
-                       const std::string& snapshot_name,
-                       std::string mix_template = "");
+                       const std::string& fullpath,
+                       const std::string& snapshot_name,
+                       std::string mix_template = "");
 
        /* creating a new Session */
 
        Session (AudioEngine&,
-                       std::string fullpath,
-                       std::string snapshot_name,
+                       std::string fullpath,
+                       std::string snapshot_name,
                        AutoConnectOption input_auto_connect,
                        AutoConnectOption output_auto_connect,
                        uint32_t control_out_channels,
@@ -249,6 +249,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        void set_snap_name ();
 
+       bool writable() const { return _writable; }
        void set_dirty ();
        void set_clean ();
        bool dirty() const { return _state_of_the_state & Dirty; }
@@ -304,7 +305,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        typedef std::list<boost::shared_ptr<Diskstream> > DiskstreamList;
 
-       int load_routes (const XMLNode&);
+       int load_routes (const XMLNode&, int);
        boost::shared_ptr<RouteList> get_routes() const {
                return routes.reader ();
        }
@@ -318,10 +319,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        }
 
        struct RoutePublicOrderSorter {
-           bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
+               bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
        };
-       
-       void sync_order_keys (const char* base);
+
+       void sync_order_keys (std::string const &);
 
        template<class T> void foreach_route (T *obj, void (T::*func)(Route&));
        template<class T> void foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>));
@@ -418,7 +419,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        double frames_per_smpte_frame() const { return _frames_per_smpte_frame; }
        nframes_t smpte_frames_per_hour() const { return _smpte_frames_per_hour; }
 
-       MIDI::byte get_mtc_smpte_bits() const { 
+       MIDI::byte get_mtc_smpte_bits() const {
                return mtc_smpte_bits;   /* encoding of SMTPE type for MTC */
        }
 
@@ -467,7 +468,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        static std::vector<std::string*>* possible_states (std::string path);
 
        XMLNode& get_state();
-       int      set_state(const XMLNode& node); // not idempotent
+       int      set_state(const XMLNode& node, int version); // not idempotent
        XMLNode& get_template();
 
        /// The instant xml file is written to the session directory
@@ -505,7 +506,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        std::list<boost::shared_ptr<AudioTrack> > new_audio_track (
                int input_channels, int output_channels, TrackMode mode = Normal, RouteGroup* route_group = 0, uint32_t how_many = 1
                );
-       
+
        RouteList new_audio_route (int input_channels, int output_channels, RouteGroup* route_group, uint32_t how_many);
 
        std::list<boost::shared_ptr<MidiTrack> > new_midi_track (
@@ -581,7 +582,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        /// signals the current transport position in frames, bbt and smpte time (in that order)
        sigc::signal<void, const nframes_t&, const BBT_Time&, const SMPTE::Time&> tick;
-       
+
        /* region info  */
 
        void add_regions (std::vector<boost::shared_ptr<Region> >&);
@@ -627,7 +628,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        boost::shared_ptr<ExportHandler> get_export_handler ();
        boost::shared_ptr<ExportStatus> get_export_status ();
 
-       int  start_audio_export (nframes_t position, bool realtime);    
+       int  start_audio_export (nframes_t position, bool realtime);
 
        sigc::signal<int, nframes_t> ProcessExport;
        sigc::signal<void> ExportReadFinished;
@@ -716,8 +717,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        /* flattening stuff */
 
        boost::shared_ptr<Region> write_one_track (AudioTrack&, nframes_t start, nframes_t end,
-                                                  bool overwrite, std::vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot,
-                                                  bool enable_processing = true);
+                       bool overwrite, std::vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot,
+                       bool enable_processing = true);
        int freeze (InterThreadInfo&);
 
        /* session-wide solo/mute/rec-enable */
@@ -740,8 +741,11 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        boost::shared_ptr<Route> control_out() const { return _control_out; }
        boost::shared_ptr<Route> master_out() const { return _master_out; }
 
-       void globally_add_internal_sends (boost::shared_ptr<Route> dest);
-       void add_internal_sends (boost::shared_ptr<Route> dest, boost::shared_ptr<RouteList> senders);
+       void globally_add_internal_sends (boost::shared_ptr<Route> dest, Placement p);
+       void globally_set_send_gains_from_track (boost::shared_ptr<Route> dest);
+       void globally_set_send_gains_to_zero (boost::shared_ptr<Route> dest);
+       void globally_set_send_gains_to_unity (boost::shared_ptr<Route> dest);
+       void add_internal_sends (boost::shared_ptr<Route> dest, Placement p, boost::shared_ptr<RouteList> senders);
 
        static void set_disable_all_loaded_plugins (bool yn) {
                _disable_all_loaded_plugins = yn;
@@ -842,22 +846,21 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        class GlobalRouteStateCommand : public Command
        {
-         public:
+       public:
                GlobalRouteStateCommand (Session&, void*);
                GlobalRouteStateCommand (Session&, const XMLNode& node);
-               int set_state (const XMLNode&);
+               int set_state (const XMLNode&, int version);
                XMLNode& get_state ();
 
-         protected:
+       protected:
                GlobalRouteBooleanState before, after;
                Session& sess;
                void* src;
-
        };
 
        class GlobalSoloStateCommand : public GlobalRouteStateCommand
        {
-         public:
+       public:
                GlobalSoloStateCommand (Session &, void *src);
                GlobalSoloStateCommand (Session&, const XMLNode&);
                void operator()(); //redo
@@ -868,7 +871,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        class GlobalMuteStateCommand : public GlobalRouteStateCommand
        {
-         public:
+       public:
                GlobalMuteStateCommand(Session &, void *src);
                GlobalMuteStateCommand (Session&, const XMLNode&);
                void operator()(); // redo
@@ -879,7 +882,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        class GlobalRecordEnableStateCommand : public GlobalRouteStateCommand
        {
-         public:
+       public:
                GlobalRecordEnableStateCommand(Session &, void *src);
                GlobalRecordEnableStateCommand (Session&, const XMLNode&);
                void operator()(); // redo
@@ -890,16 +893,16 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        class GlobalMeteringStateCommand : public Command
        {
-         public:
+       public:
                GlobalMeteringStateCommand(Session &, void *src);
                GlobalMeteringStateCommand (Session&, const XMLNode&);
                void operator()();
                void undo();
                XMLNode &get_state();
-               int set_state (const XMLNode&);
+               int set_state (const XMLNode&, int version);
                void mark();
 
-         protected:
+       protected:
                Session& sess;
                void* src;
                GlobalRouteMeterState before;
@@ -935,7 +938,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        gain_t* gain_automation_buffer () const { return _gain_automation_buffer; }
        pan_t** pan_automation_buffer () const  { return _pan_automation_buffer; }
-       
+
        void ensure_buffer_set (BufferSet& buffers, const ChanCount& howmany);
 
        /* VST support */
@@ -960,6 +963,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        SessionConfiguration config;
 
+       bool exporting () const {
+               return _exporting;
+       }
+
   protected:
        friend class AudioEngine;
        void set_block_size (nframes_t nframes);
@@ -1011,13 +1018,13 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        Location*                start_location;
        Slave*                  _slave;
        bool                    _silent;
-       
+
     // varispeed playback
        volatile double             _transport_speed;
        double                      _last_transport_speed;
        double                      _target_transport_speed;
-       FixedPointLinearInterpolation  interpolation;
-       
+       CubicInterpolation          interpolation;
+
        bool                     auto_play_legal;
        nframes_t               _last_slave_transport_frame;
        nframes_t                maximum_output_latency;
@@ -1034,9 +1041,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        float                   _meter_falloff;
        bool                    _non_soloed_outs_muted;
        uint32_t                _listen_cnt;
+       bool                    _writable;
 
        void set_worst_io_latencies ();
-       void set_worst_io_latencies_x (IOChange asifwecare, void *ignored) {
+       void set_worst_io_latencies_x (IOChange, void *) {
                set_worst_io_latencies ();
        }
 
@@ -1076,10 +1084,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        void reset_slave_state ();
        bool follow_slave (nframes_t);
        void calculate_moving_average_of_slave_delta(int dir, nframes_t this_delta);
-       void track_slave_state(float slave_speed, nframes_t slave_transport_frame, 
-                              nframes_t this_delta, bool starting);
+       void track_slave_state(float slave_speed, nframes_t slave_transport_frame,
+                              nframes_t this_delta, bool starting);
        void follow_slave_silently(nframes_t nframes, float slave_speed);
-       
+
        void set_slave_source (SlaveSource);
 
        SlaveSource post_export_slave;
@@ -1087,14 +1095,14 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        bool _exporting;
        bool _exporting_realtime;
-       
+
        boost::shared_ptr<ExportHandler> export_handler;
        boost::shared_ptr<ExportStatus>  export_status;
 
        int  pre_export ();
        int  stop_audio_export ();
        void finalize_audio_export ();
-       
+
        sigc::connection export_freewheel_connection;
 
        void prepare_diskstreams ();
@@ -1126,8 +1134,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        }
 
        bool maybe_stop (nframes_t limit) {
-               if (   (_transport_speed > 0.0f && _transport_frame >= limit)
-                   || (_transport_speed < 0.0f && _transport_frame == 0)    ) {
+               if ( (_transport_speed > 0.0f && _transport_frame >= limit)
+                               || (_transport_speed < 0.0f && _transport_frame == 0) ) {
                        stop_transport ();
                        return true;
                }
@@ -1162,8 +1170,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        std::string _current_snapshot_name;
 
-       XMLTree* state_tree;
-       bool     state_was_pending;
+       XMLTree*         state_tree;
+       bool             state_was_pending;
        StateOfTheState _state_of_the_state;
 
        void     auto_save();
@@ -1179,8 +1187,6 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        bool              pending_abort;
        bool              pending_auto_loop;
 
-       Sample*           butler_mixdown_buffer;
-       float*            butler_gain_buffer;
        pthread_t         butler_thread;
        Glib::Mutex       butler_request_lock;
        Glib::Cond        butler_paused;
@@ -1431,7 +1437,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
 
        /* edit/mix groups */
 
-       int load_route_groups (const XMLNode&);
+       int load_route_groups (const XMLNode&, int);
 
        std::list<RouteGroup *> _route_groups;
 
@@ -1450,7 +1456,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        void add_routes (RouteList&, bool save);
        uint32_t destructive_index;
 
-       boost::shared_ptr<Route> XMLRouteFactory (const XMLNode&);
+       boost::shared_ptr<Route> XMLRouteFactory (const XMLNode&, int);
 
        /* mixer stuff */
 
@@ -1627,15 +1633,15 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
                Click (nframes_t s, nframes_t d, const Sample *b)
                        : start (s), duration (d), data (b) { offset = 0; }
 
-               void *operator new(size_t ignored) {
+               void *operator new (size_t) {
                        return pool.alloc ();
                };
 
-               void operator delete(void *ptr, size_t size) {
+               void operator delete(void *ptr, size_t /*size*/) {
                        pool.release (ptr);
                }
 
-         private:
+       private:
                static Pool pool;
        };
 
@@ -1721,7 +1727,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
        void sync_order_keys ();
 
        static bool _disable_all_loaded_plugins;
-       
+
        SessionMetadata * _metadata;
 
        mutable bool have_looped; ///< Used in ::audible_frame(*)