Selection of visible note range (full range vs fit contents, selectable from midi...
[ardour.git] / libs / ardour / ardour / session.h
index 16ee76a06b2b04b9ec24fbe90416d541746eaae4..8a5165396832da0645519a63eb5c21aea45fc92f 100644 (file)
@@ -87,9 +87,9 @@ class MidiDiskstream;
 class AudioFileSource;
 class MidiSource;
 class Auditioner;
-class Insert;
+class Processor;
 class Send;
-class Redirect;
+class IOProcessor;
 class PortInsert;
 class PluginInsert;
 class Bundle;
@@ -261,11 +261,6 @@ class Session : public PBD::StatefulDestructible
 
        std::string automation_dir () const;
 
-       static string suffixed_search_path (std::string suffix, bool data);
-       static string control_protocol_path ();
-       static string template_path ();
-       static string template_dir ();
-       
        static string change_audio_path_by_name (string oldpath, string oldname, string newname, bool destructive);
        static string change_midi_path_by_name (string oldpath, string oldname, string newname, bool destructive);
        
@@ -277,7 +272,7 @@ class Session : public PBD::StatefulDestructible
 
        BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);
        BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO);
-       BufferSet& get_send_buffers (ChanCount count = ChanCount::ZERO);
+       BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO);
        
        void add_diskstream (boost::shared_ptr<Diskstream>);
        boost::shared_ptr<Diskstream> diskstream_by_id (const PBD::ID& id);
@@ -353,6 +348,7 @@ class Session : public PBD::StatefulDestructible
        sigc::signal<void,nframes_t> PositionChanged; /* sent after any non-sequential motion */
        sigc::signal<void> DurationChanged;
        sigc::signal<void> HaltOnXrun;
+       sigc::signal<void> TransportLooped;
 
        sigc::signal<void,RouteList&> RouteAdded;
 
@@ -422,14 +418,10 @@ class Session : public PBD::StatefulDestructible
        int save_state (string snapshot_name, bool pending = false);
        int restore_state (string snapshot_name);
        int save_template (string template_name);
-        int save_history (string snapshot_name = "");
-        int restore_history (string snapshot_name);
+       int save_history (string snapshot_name = "");
+       int restore_history (string snapshot_name);
        void remove_state (string snapshot_name);
        void rename_state (string old_name, string new_name);
-
-       static int rename_template (string old_name, string new_name);
-
-       static int delete_template (string name);
        
        sigc::signal<void,string> StateSaved;
        sigc::signal<void> StateReady;
@@ -440,8 +432,10 @@ class Session : public PBD::StatefulDestructible
        XMLNode& get_state();
        int      set_state(const XMLNode& node); // not idempotent
        XMLNode& get_template();
-       
-       void add_instant_xml (XMLNode&, const std::string& dir);
+
+       /// The instant xml file is written to the session directory
+       void add_instant_xml (XMLNode&);
+       XMLNode * instant_xml (const std::string& str);
 
        enum StateOfTheState {
                Clean = 0x0,
@@ -655,9 +649,11 @@ class Session : public PBD::StatefulDestructible
        sigc::signal<void> NamedSelectionAdded;
        sigc::signal<void> NamedSelectionRemoved;
 
-        /* Curves and AutomationLists (TODO when they go away) */
-        void add_curve(Curve*);
-        void add_automation_list(AutomationList*);
+       /* Curves and AutomationLists (TODO when they go away) */
+       void add_curve(Curve*);
+       void add_automation_list(AutomationList*);
+       
+       nframes_t automation_interval () const { return _automation_interval; }
 
        /* fade curves */
 
@@ -786,9 +782,9 @@ class Session : public PBD::StatefulDestructible
 
        std::map<PBD::ID, PBD::StatefulThingWithGoingAway*> registry;
 
-        // these commands are implemented in libs/ardour/session_command.cc
+       // these commands are implemented in libs/ardour/session_command.cc
        Command* memento_command_factory(XMLNode* n);
-        void register_with_memento_command_factory(PBD::ID, PBD::StatefulThingWithGoingAway*);
+       void register_with_memento_command_factory(PBD::ID, PBD::StatefulThingWithGoingAway*);
 
        Command* global_state_command_factory (const XMLNode& n);
 
@@ -923,9 +919,9 @@ class Session : public PBD::StatefulDestructible
 
        /* Controllables */
 
-       PBD::Controllable* controllable_by_id (const PBD::ID&);
+       boost::shared_ptr<PBD::Controllable> controllable_by_id (const PBD::ID&);
 
-       void add_controllable (PBD::Controllable*);
+       void add_controllable (boost::shared_ptr<PBD::Controllable>);
        void remove_controllable (PBD::Controllable*);
 
   protected:
@@ -990,7 +986,7 @@ class Session : public PBD::StatefulDestructible
        nframes_t           last_stop_frame;
        BufferSet*              _scratch_buffers;
        BufferSet*              _silent_buffers;
-       BufferSet*              _send_buffers;
+       BufferSet*              _mix_buffers;
        nframes_t           current_block_size;
        nframes_t          _worst_output_latency;
        nframes_t          _worst_input_latency;
@@ -1378,7 +1374,7 @@ class Session : public PBD::StatefulDestructible
 
        void set_play_loop (bool yn);
        void overwrite_some_buffers (Diskstream*);
-       void flush_all_redirects ();
+       void flush_all_inserts ();
        void locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
        void start_locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false);
        void force_locate (nframes_t frame, bool with_roll = false);
@@ -1525,8 +1521,8 @@ class Session : public PBD::StatefulDestructible
        uint32_t          insert_cnt;
 
 
-       void add_redirect (Redirect *);
-       void remove_redirect (Redirect *);
+       void add_processor (Processor *);
+       void remove_processor (Processor *);
 
        /* S/W RAID */
 
@@ -1654,6 +1650,8 @@ class Session : public PBD::StatefulDestructible
        void allocate_pan_automation_buffers (nframes_t nframes, uint32_t howmany, bool force);
        uint32_t _npan_buffers;
 
+       nframes_t _automation_interval;
+
        /* VST support */
 
        long _vst_callback (VSTPlugin*,
@@ -1678,7 +1676,7 @@ class Session : public PBD::StatefulDestructible
        LayerModel layer_model;
        CrossfadeModel xfade_model;
 
-       typedef std::set<PBD::Controllable*> Controllables;
+       typedef std::set<boost::shared_ptr<PBD::Controllable> > Controllables;
        Glib::Mutex controllables_lock;
        Controllables controllables;