move MIDI::Manager::cycle_{start,end}() calls from Session into AudioEngine so that they will continue even if the session has been disconnected from the session

git-svn-id: svn://localhost/ardour2/branches/3.0@12066 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-04-23 16:24:41 +00:00
parent 6ca4b88d5a
commit c9f09a10c4
2 changed files with 14 additions and 4 deletions

View File

@ -476,12 +476,21 @@ AudioEngine::process_callback (pframes_t nframes)
next_processed_frames = _processed_frames + nframes;
}
if (!tm.locked() || _session == 0) {
if (!tm.locked()) {
/* return having done nothing */
_processed_frames = next_processed_frames;
return 0;
}
if (_session == 0) {
if (!_freewheeling) {
MIDI::Manager::instance()->cycle_start(nframes);
MIDI::Manager::instance()->cycle_end();
}
_processed_frames = next_processed_frames;
return 0;
}
if (session_remove_pending) {
/* perform the actual session removal */
_session = 0;
@ -518,9 +527,13 @@ AudioEngine::process_callback (pframes_t nframes)
}
} else {
MIDI::Manager::instance()->cycle_start(nframes);
if (_session) {
_session->process (nframes);
}
MIDI::Manager::instance()->cycle_end();
}
if (_freewheeling) {

View File

@ -62,8 +62,6 @@ Session::process (pframes_t nframes)
{
framepos_t transport_at_start = _transport_frame;
MIDI::Manager::instance()->cycle_start(nframes);
_silent = false;
if (processing_blocked()) {
@ -99,7 +97,6 @@ Session::process (pframes_t nframes)
SendFeedback (); /* EMIT SIGNAL */
MIDI::Manager::instance()->cycle_end();
}
int