make small beginning on visibility control in libardour
[ardour.git] / libs / ardour / ardour / session.h
index 1d81473f1d60612cdf6bccc52e9b44a759e23f44..0f4e04715ac31e28922170190868cc520d632a5c 100644 (file)
@@ -140,7 +140,7 @@ class WindowsVSTPlugin;
 
 extern void setup_enum_writer ();
 
-class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager
+class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager
 {
   public:
        enum RecordState {
@@ -161,6 +161,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        virtual ~Session ();
 
+        static int get_info_from_path (const std::string& xmlpath, float& sample_rate, SampleFormat& data_format);
+
        std::string path() const { return _path; }
        std::string name() const { return _name; }
        std::string snap_name() const { return _current_snapshot_name; }
@@ -509,7 +511,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        static PBD::Signal1<void, framepos_t> EndTimeChanged;
 
        void   request_sync_source (Slave*);
-       bool   synced_to_jack() const { return config.get_external_sync() && Config->get_sync_source() == JACK; }
+       bool   synced_to_engine() const { return config.get_external_sync() && Config->get_sync_source() == Engine; }
 
        double transport_speed() const { return _transport_speed; }
        bool   transport_stopped() const { return _transport_speed == 0.0f; }
@@ -879,15 +881,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
     MIDI::MachineControl& mmc() { return *_mmc; }
 
-        /* Callbacks specifically related to JACK, and called directly
-        * from the JACK audio backend.
-         */
-
-#ifdef HAVE_JACK_SESSION
-       void jack_session_event (jack_session_event_t* event);
-#endif
-        void jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t*, int);
-
   protected:
        friend class AudioEngine;
        void set_block_size (pframes_t nframes);
@@ -1071,7 +1064,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        boost::scoped_ptr<SessionDirectory> _session_dir;
 
        void hookup_io ();
-        int when_engine_running ();
        void graph_reordered ();
 
        /** current snapshot name, without the .ardour suffix */
@@ -1137,8 +1129,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void             auto_loop_changed (Location *);
        void             auto_loop_declick_range (Location *, framepos_t &, framepos_t &);
 
+        int  ensure_engine (uint32_t desired_sample_rate);
        void pre_engine_init (std::string path);
        int  post_engine_init ();
+        int  immediately_post_engine ();
        void remove_empty_sounds ();
 
        void setup_midi_control ();
@@ -1521,13 +1515,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
                float opt
                );
 
-       /* number of hardware ports we're using,
-          based on max (requested,available)
-       */
-
-       ChanCount n_physical_outputs;
-       ChanCount n_physical_inputs;
-
        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);
 
@@ -1623,8 +1610,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
     void setup_ltc ();
     void setup_click ();
+    void setup_click_state (const XMLNode&);
     void setup_bundles ();
-    int  ensure_engine (uint32_t desired_sample_rate);
+
+    static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath);
 };
 
 } // namespace ARDOUR