rename Session::add_session_range_location() to ::set_session_range_location()
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 13 May 2015 14:16:16 +0000 (10:16 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:14 +0000 (14:18 -0400)
libs/ardour/ardour/session.h
libs/ardour/session.cc
libs/ardour/session_state.cc

index 0714077302414b5b6c23e2eedade6929c88754a7..487437023ce7ea1a4e19350ccf9aab4ddf84dc08 100644 (file)
@@ -1758,7 +1758,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        /** temporary list of Diskstreams used only during load of 2.X sessions */
        std::list<boost::shared_ptr<Diskstream> > _diskstreams_2X;
 
-       void add_session_range_location (framepos_t, framepos_t);
+       void set_session_range_location (framepos_t, framepos_t);
 
        void setup_midi_machine_control ();
 
index a75f90dbc79a89582932835fcf1fd314ba7aa6d2..e1eed879a55a4bd6133de027775cb16da802d4ee 100644 (file)
@@ -3946,7 +3946,7 @@ Session::maybe_update_session_range (framepos_t a, framepos_t b)
 
        if (_session_range_location == 0) {
 
-               add_session_range_location (a, b);
+               set_session_range_location (a, b);
 
        } else {
 
@@ -5589,7 +5589,7 @@ Session::current_end_frame () const
 }
 
 void
-Session::add_session_range_location (framepos_t start, framepos_t end)
+Session::set_session_range_location (framepos_t start, framepos_t end)
 {
        _session_range_location = new Location (*this, start, end, _("session"), Location::IsSessionRange);
        _locations->add (_session_range_location);
index b51d7a7d694b7f1c30477c232076a09ebfc34d03..003dac8f94a3d5adaa703abb621530b8dddbf1be 100644 (file)
@@ -572,7 +572,21 @@ Session::create (const string& session_template, BusProfile* bus_profile)
 
        }
 
-       /* set initial start + end point */
+       if (Profile->get_trx()) {
+       
+               /* set initial start + end point : ARDOUR::Session::session_end_shift long.
+                  Remember that this is a brand new session. Sessions
+                  loaded from saved state will get this range from the saved state.
+               */
+               
+               set_session_range_location (0, 0);
+               
+               /* Initial loop location, from absolute zero, length 10 seconds  */
+               
+               Location* loc = new Location (*this, 0, 10.0 * _engine.sample_rate(), _("Loop"),  Location::IsAutoLoop);
+               _locations->add (loc, true);
+               set_auto_loop_location (loc);
+       }
 
        _state_of_the_state = Clean;