13
0

Luasession: load default session snapshot

This commit is contained in:
Robin Gareus 2020-11-30 22:18:09 +01:00
parent d5a2f6b2e0
commit 3c85fe252a
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -17,6 +17,7 @@
#include <glibmm.h>
#include "pbd/basename.h"
#include "pbd/debug.h"
#include "pbd/error.h"
#include "pbd/event_loop.h"
@ -243,12 +244,19 @@ _create_session (string dir, string state, uint32_t rate) // throws
}
static Session*
_load_session (string dir, string state) // throws
_load_session (string const& dir, string state) // throws
{
if (prepare_engine ()) {
return 0;
}
if (state.empty ()) {
state = Session::get_snapshot_from_instant (dir);
}
if (state.empty ()) {
state = PBD::basename_nosuffix (dir);
}
float sr;
SampleFormat sf;
std::string v;