diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/audio_track.cc | 19 | ||||
-rw-r--r-- | libs/ardour/route.cc | 16 | ||||
-rw-r--r-- | libs/ardour/session_events.cc | 1 |
3 files changed, 28 insertions, 8 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 95099676e7..beec3ee4de 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -483,18 +483,25 @@ AudioTrack::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_fra return 0; } + bool send_silence; + 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, false); - 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. + */ } audio_diskstream()->check_record_status (start_frame, nframes, can_record); - bool send_silence; - if (_have_internal_generator) { /* since the instrument has no input streams, there is no reason to send any signal diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 54bb140c98..7ff4af8ac7 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2315,11 +2315,25 @@ Route::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, return 0; } - if (session_state_changing || !_active) { + if (!_active) { 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); + } + /* 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. + */ + } + apply_gain_automation = false; if (n_inputs()) { diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index 036918f940..d8982046f1 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -332,7 +332,6 @@ Session::process_event (Event* ev) case Event::LocateRollLocate: // locate is handled by ::request_roll_at_and_return() _requested_return_frame = ev->target_frame; - cerr << "Set RRF " << ev->target_frame << endl; request_locate (ev->target2_frame, true); break; |