diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-01-20 20:21:45 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-01-20 20:21:45 +0000 |
commit | 97c5892b51c29f2e188eb1ac9ddbfbac602d1b25 (patch) | |
tree | cda58acdddd3b970fbb1f154906c9085ebc80d65 /libs | |
parent | 039447dc55942416d4888a5d869598ac26f99d51 (diff) |
if ::no_roll() is called on a track or a route, and there is some behind-the-scenes state changing going on (e.g. with diskstream buffers) then just keep monitoring input (both tracks and busses) rather than pushing silence through the route
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6526 d708f5d6-7413-0410-9779-e7cbd77b26cf
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; |