mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 17:16:38 +01:00
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:
parent
6ca4b88d5a
commit
c9f09a10c4
2 changed files with 14 additions and 4 deletions
|
|
@ -476,12 +476,21 @@ AudioEngine::process_callback (pframes_t nframes)
|
||||||
next_processed_frames = _processed_frames + nframes;
|
next_processed_frames = _processed_frames + nframes;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tm.locked() || _session == 0) {
|
if (!tm.locked()) {
|
||||||
/* return having done nothing */
|
/* return having done nothing */
|
||||||
_processed_frames = next_processed_frames;
|
_processed_frames = next_processed_frames;
|
||||||
return 0;
|
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) {
|
if (session_remove_pending) {
|
||||||
/* perform the actual session removal */
|
/* perform the actual session removal */
|
||||||
_session = 0;
|
_session = 0;
|
||||||
|
|
@ -518,9 +527,13 @@ AudioEngine::process_callback (pframes_t nframes)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
MIDI::Manager::instance()->cycle_start(nframes);
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
_session->process (nframes);
|
_session->process (nframes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MIDI::Manager::instance()->cycle_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_freewheeling) {
|
if (_freewheeling) {
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,6 @@ Session::process (pframes_t nframes)
|
||||||
{
|
{
|
||||||
framepos_t transport_at_start = _transport_frame;
|
framepos_t transport_at_start = _transport_frame;
|
||||||
|
|
||||||
MIDI::Manager::instance()->cycle_start(nframes);
|
|
||||||
|
|
||||||
_silent = false;
|
_silent = false;
|
||||||
|
|
||||||
if (processing_blocked()) {
|
if (processing_blocked()) {
|
||||||
|
|
@ -99,7 +97,6 @@ Session::process (pframes_t nframes)
|
||||||
|
|
||||||
SendFeedback (); /* EMIT SIGNAL */
|
SendFeedback (); /* EMIT SIGNAL */
|
||||||
|
|
||||||
MIDI::Manager::instance()->cycle_end();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue