Add Session::create_session_file method
git-svn-id: svn://localhost/ardour2/trunk@1869 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
62c4c4cfbd
commit
5f7f6e092a
@ -955,6 +955,7 @@ class Session : public PBD::StatefulDestructible
|
||||
void destroy ();
|
||||
|
||||
void initialize_start_and_end_locations(nframes_t start, nframes_t end);
|
||||
bool create_session_file();
|
||||
|
||||
nframes_t compute_initial_length ();
|
||||
|
||||
|
@ -464,7 +464,7 @@ Session::setup_raid_path (string path)
|
||||
}
|
||||
|
||||
void
|
||||
Session::initialize_start_and_end_locations(nframes_t start, nframes_t end)
|
||||
Session::initialize_start_and_end_locations (nframes_t start, nframes_t end)
|
||||
{
|
||||
start_location->set_end (start);
|
||||
_locations.add (start_location);
|
||||
@ -473,6 +473,18 @@ Session::initialize_start_and_end_locations(nframes_t start, nframes_t end)
|
||||
_locations.add (end_location);
|
||||
}
|
||||
|
||||
bool
|
||||
Session::create_session_file ()
|
||||
{
|
||||
_state_of_the_state = Clean;
|
||||
|
||||
if (save_state (_current_snapshot_name)) {
|
||||
error << "Could not create new session file" << endmsg;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
Session::create (bool& new_session, string* mix_template, nframes_t initial_length)
|
||||
{
|
||||
@ -535,11 +547,7 @@ Session::create (bool& new_session, string* mix_template, nframes_t initial_leng
|
||||
|
||||
initialize_start_and_end_locations(0, initial_length);
|
||||
|
||||
_state_of_the_state = Clean;
|
||||
|
||||
if (save_state (_current_snapshot_name)) {
|
||||
return -1;
|
||||
}
|
||||
if (!create_session_file()) return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user