diff options
-rw-r--r-- | libs/ardour/route.cc | 16 | ||||
-rw-r--r-- | libs/ardour/track.cc | 15 |
2 files changed, 26 insertions, 5 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index fa4b3ce51d..6e8b134cc9 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2520,10 +2520,24 @@ Route::no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, return 0; } - if (session_state_changing || !_active || n_inputs() == ChanCount::ZERO) { + if (!_active || n_inputs() == ChanCount::ZERO) { silence (nframes); return 0; } + if (session_state_changing) { + if (_session.transport_speed() != 0.0f) { + /* we're rolling but some state is changing (e.g. our diskstream contents) + so we cannot use them. Be silent till this is over. + + XXX note the absurdity of ::no_roll() being called when we ARE rolling! + */ + silence (nframes); + return 0; + } + /* we're really not rolling, so we're either delivery silence or actually + monitoring, both of which are safe to do while session_state_changing is true. + */ + } _amp->apply_gain_automation (false); passthru (start_frame, end_frame, nframes, 0); diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index f286e07c25..5e53483999 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -247,11 +247,18 @@ Track::no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, } if (session_state_changing) { + if (_session.transport_speed() != 0.0f) { + /* we're rolling but some state is changing (e.g. our diskstream contents) + so we cannot use them. Be silent till this is over. - /* XXX is this safe to do against transport state changes? */ - - passthru_silence (start_frame, end_frame, nframes, 0); - return 0; + XXX note the absurdity of ::no_roll() being called when we ARE rolling! + */ + passthru_silence (start_frame, end_frame, nframes, 0, false); + return 0; + } + /* we're really not rolling, so we're either delivery silence or actually + monitoring, both of which are safe to do while session_state_changing is true. + */ } diskstream()->check_record_status (start_frame, nframes, can_record); |