Add a Session::initialize_start_and_end_locations method

git-svn-id: svn://localhost/ardour2/trunk@1868 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Tim Mayberry
2007-05-18 02:45:22 +00:00
parent c7e404a1c0
commit 62c4c4cfbd
2 changed files with 13 additions and 7 deletions

View File

@@ -954,6 +954,8 @@ class Session : public PBD::StatefulDestructible
int create (bool& new_session, string* mix_template, nframes_t initial_length);
void destroy ();
void initialize_start_and_end_locations(nframes_t start, nframes_t end);
nframes_t compute_initial_length ();
enum SubState {

View File

@@ -463,6 +463,16 @@ Session::setup_raid_path (string path)
last_rr_session_dir = session_dirs.begin();
}
void
Session::initialize_start_and_end_locations(nframes_t start, nframes_t end)
{
start_location->set_end (start);
_locations.add (start_location);
end_location->set_end (end);
_locations.add (end_location);
}
int
Session::create (bool& new_session, string* mix_template, nframes_t initial_length)
{
@@ -523,13 +533,7 @@ Session::create (bool& new_session, string* mix_template, nframes_t initial_leng
return 0;
}
/* set initial start + end point */
start_location->set_end (0);
_locations.add (start_location);
end_location->set_end (initial_length);
_locations.add (end_location);
initialize_start_and_end_locations(0, initial_length);
_state_of_the_state = Clean;