From e0b694f630e31039e082c1ce640dfaf85bfede3c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 5 Jan 2012 05:05:31 +0000 Subject: possibly fix deadlocking issues with tempo map by rearranging code and adding RT variants for a couple of functions that would normally try to rebuild the map when necessary; instead the variants throw an exception and the RT code that called them tries to do something reasonable git-svn-id: svn://localhost/ardour2/branches/3.0@11164 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_process.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libs/ardour/session_process.cc') diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 89dd83b9c6..1055a7c504 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -38,6 +38,7 @@ #include "ardour/timestamps.h" #include "ardour/graph.h" #include "ardour/audio_port.h" +#include "ardour/tempo.h" #include "midi++/manager.h" #include "midi++/mmc.h" @@ -79,10 +80,14 @@ Session::process (pframes_t nframes) // the ticker is for sending time information like MidiClock framepos_t transport_frames = transport_frame(); Timecode::BBT_Time transport_bbt; - bbt_time(transport_frames, transport_bbt); - Timecode::Time transport_timecode; - timecode_time(transport_frames, transport_timecode); - tick (transport_frames, transport_bbt, transport_timecode); /* EMIT SIGNAL */ + try { + _tempo_map->bbt_time_rt (transport_frames, transport_bbt); + Timecode::Time transport_timecode; + timecode_time(transport_frames, transport_timecode); + tick (transport_frames, transport_bbt, transport_timecode); /* EMIT SIGNAL */ + } catch (...) { + warning << _("Missed MIDI Clock tick due to problems with tempo map") << endmsg; + } SendFeedback (); /* EMIT SIGNAL */ -- cgit v1.2.3