diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-30 20:58:17 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-30 20:58:17 +0000 |
commit | 90bab430c4caa5aa541bbf32e60dc2251b3c1a94 (patch) | |
tree | e593415cae6a0a922464fcff103db9a711bb4077 | |
parent | 8f0b5a326b9234b787d678da9939861f8cf4c913 (diff) |
Fix non-summon of butler when a track that needs it is followed by a track that does not (in the single-process-thread-CPU case). Should fix #4677.
git-svn-id: svn://localhost/ardour2/branches/3.0@11391 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/audio_track.cc | 3 | ||||
-rw-r--r-- | libs/ardour/midi_track.cc | 3 | ||||
-rw-r--r-- | libs/ardour/session_process.cc | 22 |
3 files changed, 26 insertions, 2 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 458738bddb..e6a5b82cff 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -308,6 +308,9 @@ AudioTrack::set_state_part_two () } } +/** @param need_butler to be set to true if this track now needs the butler, otherwise it can be left alone + * or set to false. + */ int AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler) { diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 1b40cb5f56..3d9b0f94ff 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -269,6 +269,9 @@ MidiTrack::set_state_part_two () return; } +/** @param need_butler to be set to true if this track now needs the butler, otherwise it can be left alone + * or set to false. + */ int MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler) { diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index d79e2b2c67..db45143259 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -146,6 +146,9 @@ Session::no_roll (pframes_t nframes) return ret; } +/** @param need_butler to be set to true by this method if it needs the butler, + * otherwise it can be left alone or set to false. + */ int Session::process_routes (pframes_t nframes, bool& need_butler) { @@ -175,16 +178,25 @@ Session::process_routes (pframes_t nframes, bool& need_butler) (*i)->set_pending_declick (declick); - if ((ret = (*i)->roll (nframes, start_frame, end_frame, declick, need_butler)) < 0) { + bool b = false; + + if ((ret = (*i)->roll (nframes, start_frame, end_frame, declick, b)) < 0) { stop_transport (); return -1; } + + if (b) { + need_butler = true; + } } } return 0; } +/** @param need_butler to be set to true by this method if it needs the butler, + * otherwise it must be left alone. + */ int Session::silent_process_routes (pframes_t nframes, bool& need_butler) { @@ -204,10 +216,16 @@ Session::silent_process_routes (pframes_t nframes, bool& need_butler) continue; } - if ((ret = (*i)->silent_roll (nframes, start_frame, end_frame, need_butler)) < 0) { + bool b = false; + + if ((ret = (*i)->silent_roll (nframes, start_frame, end_frame, b)) < 0) { stop_transport (); return -1; } + + if (b) { + need_butler = true; + } } } |