Move special-cased FP8 mute-state into libardour
[ardour.git] / libs / ardour / ardour / session.h
index aad16aa44cdbb06422408330cb68b8f890c58246..dfeb1d0834cb2cdc04b633c877fe1bf95a542530 100644 (file)
@@ -199,7 +199,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        virtual ~Session ();
 
-       static int get_info_from_path (const std::string& xmlpath, float& sample_rate, SampleFormat& data_format, std::string& created_version);
+       static int get_info_from_path (const std::string& xmlpath, float& sample_rate, SampleFormat& data_format, std::string& program_version);
        static std::string get_snapshot_from_instant (const std::string& session_dir);
 
        /** a monotonic counter used for naming user-visible things uniquely
@@ -472,6 +472,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        void set_auto_punch_location (Location *);
        void set_auto_loop_location (Location *);
        void set_session_extents (framepos_t start, framepos_t end);
+       bool end_is_free () const { return _session_range_end_is_free; }
        void set_end_is_free (bool);
        int location_name(std::string& result, std::string base = std::string(""));
 
@@ -681,7 +682,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        framepos_t transport_frame () const {return _transport_frame; }
        framepos_t record_location () const {return _last_record_location; }
-       framepos_t audible_frame () const;
+       framepos_t audible_frame (bool* latent_locate = NULL) const;
        framepos_t requested_return_frame() const { return _requested_return_frame; }
        void set_requested_return_frame(framepos_t return_to);
 
@@ -720,9 +721,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        bool   synced_to_mtc () const { return config.get_external_sync() && Config->get_sync_source() == MTC && g_atomic_int_get (const_cast<gint*>(&_mtc_active)); }
        bool   synced_to_ltc () const { return config.get_external_sync() && Config->get_sync_source() == LTC && g_atomic_int_get (const_cast<gint*>(&_ltc_active)); }
 
-       double transport_speed() const { return _transport_speed; }
+       double transport_speed() const { return _count_in_samples > 0 ? 0. : _transport_speed; }
        bool   transport_stopped() const { return _transport_speed == 0.0; }
-       bool   transport_rolling() const { return _transport_speed != 0.0; }
+       bool   transport_rolling() const { return _transport_speed != 0.0 && _count_in_samples == 0; }
 
        bool silent () { return _silent; }
 
@@ -823,6 +824,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        uint32_t registered_lua_function_count () const { return _n_lua_scripts; }
        void scripts_changed (); // called from lua, updates _n_lua_scripts
 
+       PBD::Signal0<void> LuaScriptsChanged;
+
        /* flattening stuff */
 
        boost::shared_ptr<Region> write_one_track (Track&, framepos_t start, framepos_t end,
@@ -833,6 +836,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        /* session-wide solo/mute/rec-enable */
 
+       bool muted() const;
+       std::vector<boost::weak_ptr<AutomationControl> > cancel_all_mute ();
+
        bool soloing() const { return _non_soloed_outs_muted; }
        bool listening() const { return _listen_cnt > 0; }
        bool solo_isolated() const { return _solo_isolated_cnt > 0; }
@@ -851,6 +857,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        PBD::Signal1<void,bool> SoloActive;
        PBD::Signal0<void> SoloChanged;
+       PBD::Signal0<void> MuteChanged;
        PBD::Signal0<void> IsolatedChanged;
        PBD::Signal0<void> MonitorChanged;
 
@@ -1003,6 +1010,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        void request_preroll_record_punch (framepos_t start, framecnt_t preroll);
        void request_preroll_record_trim (framepos_t start, framecnt_t preroll);
+       void request_count_in_record ();
 
        framepos_t preroll_record_punch_pos () const { return _preroll_record_punch_pos; }
        bool preroll_record_punch_enabled () const { return _preroll_record_punch_pos >= 0; }
@@ -1142,6 +1150,10 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        */
        static PBD::Signal3<int,Session*,std::string,DataType> MissingFile;
 
+       void set_missing_file_replacement (const std::string& mfr) {
+               _missing_file_replacement = mfr;
+       }
+
        /** Emitted when the session wants Ardour to quit */
        static PBD::Signal0<void> Quit;
 
@@ -1257,6 +1269,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        bool                    _under_nsm_control;
        unsigned int            _xrun_count;
 
+       std::string             _missing_file_replacement;
+
        void mtc_status_changed (bool);
        PBD::ScopedConnection mtc_status_connection;
        void ltc_status_changed (bool);
@@ -1433,7 +1447,6 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        static const PostTransportWork ProcessCannotProceedMask =
                PostTransportWork (
                        PostTransportInputChange|
-                       PostTransportSpeed|
                        PostTransportReverse|
                        PostTransportCurveRealloc|
                        PostTransportAudition|
@@ -1705,7 +1718,6 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        TempoMap    *_tempo_map;
        void          tempo_map_changed (const PBD::PropertyChange&);
-       void          gui_tempo_map_changed ();
 
        /* edit/mix groups */
 
@@ -1888,6 +1900,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        typedef std::list<Click*> Clicks;
        Clicks                  clicks;
        bool                   _clicking;
+       bool                   _click_rec_only;
        boost::shared_ptr<IO>  _click_io;
        boost::shared_ptr<Amp> _click_gain;
        Sample*                 click_data;
@@ -1931,6 +1944,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        framepos_t _preroll_record_punch_pos;
        framecnt_t _preroll_record_trim_len;
+       bool _count_in_once;
 
        /* main outs */
        uint32_t main_outs;
@@ -1940,17 +1954,6 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
 
        void auto_connect_master_bus ();
 
-       /* Windows VST support */
-
-       long _windows_vst_callback (
-               WindowsVSTPlugin*,
-               long opcode,
-               long index,
-               long value,
-               void* ptr,
-               float opt
-               );
-
        int find_all_sources (std::string path, std::set<std::string>& result);
        int find_all_sources_across_snapshots (std::set<std::string>& result, bool exclude_this_snapshot);