GUI changes to get libtemporal setup at application startup

This commit is contained in:
Paul Davis 2020-11-27 22:13:51 -07:00
parent 8dbbc1df54
commit 53c164f9fd
2 changed files with 3 additions and 9 deletions

View File

@ -3693,9 +3693,9 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
TempoMap::update (map);
/* fetch it back into our local copy */
/* fetch it back into thre thread-local and locally-scoped ptrs */
map = TempoMap::use();
map = TempoMap::fetch();
XMLNode &after = map->get_state();

View File

@ -49,6 +49,7 @@
#endif
#include "temporal/superclock.h"
#include "temporal/tempo.h"
#include "ardour/revision.h"
#include "ardour/ardour.h"
@ -385,13 +386,6 @@ int main (int argc, char *argv[])
SetErrorMode (prev_error_mode);
#endif
/* this is the GUI thread. Normally this will be done by
* Gtkmm2ext::UI::event_loop_precall() but we need to make sure that
* things are set up for this thread before we get started
*/
Temporal::_thread_sample_rate = 44100;
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir.c_str(), true)) {
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
Gtk::Main main (argc, argv);