first part of using appropriate .ext extensions for the current chosen native file...
[ardour.git] / libs / ardour / ardour / session.h
index 4e2f116697e4f6fcbfd5a40a2af00446ab3657e1..21bde800d303d041a32479ff5720522eabeb8dc5 100644 (file)
@@ -180,12 +180,12 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        Glib::ustring peak_path (Glib::ustring) const;
 
-       static std::string change_source_path_by_name (std::string oldpath, std::string oldname, std::string newname, bool destructive);
+       std::string change_source_path_by_name (std::string oldpath, std::string oldname, std::string newname, bool destructive);
 
        std::string peak_path_from_audio_path (std::string) const;
        std::string new_audio_source_name (const std::string&, uint32_t nchans, uint32_t chan, bool destructive);
        std::string new_midi_source_name (const std::string&);
-       std::string new_source_path_from_name (DataType type, const std::string&);
+       std::string new_source_path_from_name (DataType type, const std::string&, bool as_stub = false);
        RouteList new_route_from_template (uint32_t how_many, const std::string& template_path);
 
        void process (nframes_t nframes);
@@ -533,9 +533,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        */
        static PBD::Signal0<int> AskAboutPendingState;
 
-       boost::shared_ptr<AudioFileSource> create_audio_source_for_session (size_t, std::string const &, uint32_t, bool);
-
-       boost::shared_ptr<MidiSource> create_midi_source_for_session (Track*, std::string const &);
+       boost::shared_ptr<AudioFileSource> create_audio_source_for_session (size_t, std::string const &, uint32_t, 
+                                                                            bool destructive, bool as_stub = false);
+        
+       boost::shared_ptr<MidiSource> create_midi_source_for_session (Track*, std::string const &, bool as_stub = false);
 
        boost::shared_ptr<Source> source_by_id (const PBD::ID&);
        boost::shared_ptr<Source> source_by_path_and_channel (const Glib::ustring&, uint16_t);
@@ -638,25 +639,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        PBD::Signal1<void,boost::shared_ptr<Bundle> > BundleAdded;
        PBD::Signal1<void,boost::shared_ptr<Bundle> > BundleRemoved;
 
-       /* MIDI control */
-
-       void midi_panic(void);
-       int set_mtc_port (std::string port_tag);
-       int set_midi_port (std::string port_tag);
-       int set_midi_clock_port (std::string port_tag);
-       MIDI::Port *mtc_port() const { return _mtc_port; }
-       MIDI::Port *midi_port() const { return _midi_port; }
-       MIDI::Port *midi_clock_port() const { return _midi_clock_port; }
-
-       PBD::Signal0<void> MTC_PortChanged;
-       PBD::Signal0<void> MIDI_PortChanged;
-       PBD::Signal0<void> MIDIClock_PortChanged;
-
-       void set_trace_midi_input (bool, MIDI::Port* port = 0);
-       void set_trace_midi_output (bool, MIDI::Port* port = 0);
-
-       bool get_trace_midi_input(MIDI::Port *port = 0);
-       bool get_trace_midi_output(MIDI::Port *port = 0);
+       void midi_panic ();
 
        /* Scrubbing */
 
@@ -788,6 +771,11 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        boost::shared_ptr<SessionPlaylists> playlists;
 
+       void send_mmc_locate (nframes64_t);
+       int send_full_time_code (nframes64_t);
+
+       PBD::Signal0<void> RouteOrderKeyChanged;
+
   protected:
        friend class AudioEngine;
        void set_block_size (nframes_t nframes);
@@ -806,9 +794,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
                PendingDeclickIn   = 0x1,
                PendingDeclickOut  = 0x2,
                StopPendingCapture = 0x4,
-               AutoReturning      = 0x10,
                PendingLocate      = 0x20,
-               PendingSetLoop     = 0x40
        };
 
        /* stuff used in process() should be close together to
@@ -947,10 +933,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        void check_declick_out ();
 
-       MIDI::MachineControl*   _mmc;
-       MIDI::Port*             _mtc_port;
-       MIDI::Port*             _midi_port;
-       MIDI::Port*             _midi_clock_port;
        std::string             _path;
        std::string             _name;
         bool                    _is_new;
@@ -1134,7 +1116,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        bool _send_timecode_update; ///< Flag to send a full frame (Timecode) MTC message this cycle
 
-       int send_full_time_code(nframes_t nframes);
        int send_midi_time_code_for_cycle(nframes_t nframes);
 
        nframes_t adjust_apparent_position (nframes_t frames);
@@ -1152,8 +1133,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        int           start_midi_thread ();
        void          terminate_midi_thread ();
 
-       int           use_config_midi_ports ();
-
        void set_play_loop (bool yn);
        void unset_play_loop ();
        void overwrite_some_buffers (Track *);
@@ -1201,8 +1180,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        bool find_route_name (const char* base, uint32_t& id, char* name, size_t name_len);
        void count_existing_route_channels (ChanCount& in, ChanCount& out);
-       void auto_connect_route (boost::shared_ptr<Route> route,
-               ChanCount& existing_inputs, ChanCount& existing_outputs);
+       void auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing_inputs, ChanCount& existing_outputs, bool connect_inputs = true);
 
        /* mixer stuff */
 
@@ -1228,8 +1206,11 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        /* SOURCES */
 
        mutable Glib::Mutex source_lock;
+
+  public:      
        typedef std::map<PBD::ID,boost::shared_ptr<Source> > SourceMap;
 
+  private:     
        SourceMap sources;
 
   public:
@@ -1436,6 +1417,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void add_session_range_location (nframes_t, nframes_t);
 
        void setup_midi_machine_control ();
+        void cleanup_stubfiles ();
+
+       void route_order_key_changed ();
 };
 
 } // namespace ARDOUR