summaryrefslogtreecommitdiff
path: root/libs/ardour/session_process.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-05 05:05:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-05 05:05:31 +0000
commite0b694f630e31039e082c1ce640dfaf85bfede3c (patch)
tree13eae2b01c2ea916199f7930afe9789a0cedf825 /libs/ardour/session_process.cc
parent4e4306d1251aedc294ae8e041f855d136f1c7e8f (diff)
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
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r--libs/ardour/session_process.cc13
1 files changed, 9 insertions, 4 deletions
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 */