diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 30e24ebfc5..e0465bc927 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -361,6 +361,8 @@ Session::Session (AudioEngine &eng, _cue_events.reserve (1024); + Temporal::reset(); + pre_engine_init (fullpath); // sets _is_new setup_lua (); diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 24357a9ece..216b8b3269 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -640,11 +640,6 @@ Session::create (const string& session_template, BusProfile const * bus_profile, << endmsg; return -1; } - - } else { - (void) TempoMap::write_copy(); /* we are going to throw away the return value and replace the map entirely */ - TempoMap::WritableSharedPtr new_map (new TempoMap (Tempo (120, 4), Meter (4, 4))); - TempoMap::update (new_map);; } /* set up Master Out and Monitor Out if necessary */ diff --git a/libs/temporal/enums.cc b/libs/temporal/enums.cc index b0e563cf2b..e61bbd7e42 100644 --- a/libs/temporal/enums.cc +++ b/libs/temporal/enums.cc @@ -76,6 +76,13 @@ void Temporal::init () } } +void Temporal::reset () +{ + (void) TempoMap::write_copy(); /* we are going to throw away the return value and replace the map entirely */ + TempoMap::WritableSharedPtr new_map (new TempoMap (Tempo (120, 4), Meter (4, 4))); + TempoMap::update (new_map);; +} + std::ostream& operator<< (std::ostream& o, Temporal::ratio_t const & r) { diff --git a/libs/temporal/temporal/types.h b/libs/temporal/temporal/types.h index ed7a88013a..df02b7fd78 100644 --- a/libs/temporal/temporal/types.h +++ b/libs/temporal/temporal/types.h @@ -30,8 +30,10 @@ namespace Temporal { #ifdef COMPILER_MSVC LIBTEMPORAL_API void init (); + LIBTEMPORAL_API void reset (); #else extern void init (); + extern void reset (); #endif /* Any position measured in audio samples.