diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-10 15:03:30 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-10 15:03:30 +0000 |
commit | 68e943265edf04e63a8e8b8f62bab20f99d9c637 (patch) | |
tree | ff8941a59662fc0c4622944b65f7b2d5e3bdd0c3 /libs/ardour/session_process.cc | |
parent | e4372df05b7d74a6b80dbbf4b6c00cc2b31c4723 (diff) |
merge from 2.0-ongoing @ 3581
git-svn-id: svn://localhost/ardour2/branches/3.0@3711 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r-- | libs/ardour/session_process.cc | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index d6890b31ae..abe802548a 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -867,18 +867,38 @@ Session::maybe_sync_start (nframes_t& nframes, nframes_t& offset) if (_engine.get_sync_offset (sync_offset) && sync_offset < nframes) { + /* generate silence up to the sync point, then + adjust nframes + offset to reflect whatever + is left to do. + */ + no_roll (sync_offset, 0); nframes -= sync_offset; offset += sync_offset; waiting_for_sync_offset = false; if (nframes == 0) { - return true; // done + return true; // done, nothing left to process } } else { + + /* sync offset point is not within this process() + cycle, so just generate silence. and don't bother + with any fancy stuff here, just the minimal silence. + */ + + g_atomic_int_inc (&processing_prohibited); no_roll (nframes, 0); - return true; // done + g_atomic_int_dec_and_test (&processing_prohibited); + + if (Config->get_locate_while_waiting_for_sync()) { + if (micro_locate (nframes)) { + /* XXX ERROR !!! XXX */ + } + } + + return true; // done, nothing left to process } return false; |