From 55b63cb5720958e789bc2fb16c51d2e3b7f1ef2d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 21 Jan 2010 14:32:22 +0000 Subject: stopped/monitor/state change bug fix from 2.X git-svn-id: svn://localhost/ardour2/branches/3.0@6528 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/track.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'libs/ardour/track.cc') 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); -- cgit v1.2.3