diff options
author | Johannes Mueller <github@johannes-mueller.org> | 2020-05-10 13:13:18 +0200 |
---|---|---|
committer | Johannes Mueller <github@johannes-mueller.org> | 2020-05-10 14:53:38 +0200 |
commit | bff9c9a5a17671de5b7c230f01ba806af4d9e0a1 (patch) | |
tree | 6cd8f3f0ed6cc1a44abfee02c377dd71ff1fedd6 /gtk2_ardour | |
parent | 52ae134efb055cfad701b7039df1c7544e47d011 (diff) |
Work around a race condition
This covers a race condition in session transport that when synced to an
external engine it sometimes occurs that at the end of ::realtime_stop()
::transport_stopped_or_stopping() returns false when ::setup_rec_box() is
called. In this case the rec boxes are not erased when the recoding transport
is stopped.
This fixes this behavior about the remaining rec boxes, however the race
condition remains.
The race condition is reported in #8104. It should be considered reverting this
commit once the race condition is fixed.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/audio_streamview.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/midi_streamview.cc | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index 25cd3c941a..b6de000d7e 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -196,7 +196,8 @@ AudioStreamView::setup_rec_box () { //cerr << _trackview.name() << " streamview SRB region_views.size() = " << region_views.size() << endl; - if (!_trackview.session()->transport_stopped_or_stopping()) { + if (!_trackview.session()->transport_stopped_or_stopping() && + (_trackview.session()->transport_rolling() || _trackview.session()->get_record_enabled())) { // cerr << "\trolling\n"; diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index bde41c1fc5..64de0b3951 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -455,7 +455,8 @@ MidiStreamView::setup_rec_box () { // cerr << _trackview.name() << " streamview SRB\n"; - if (!_trackview.session()->transport_stopped_or_stopping()) { + if (!_trackview.session()->transport_stopped_or_stopping() && + (_trackview.session()->transport_rolling() || _trackview.session()->get_record_enabled())) { if (!rec_active && _trackview.session()->record_status() == Session::Recording && |