summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-06-03 12:14:59 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-06-03 12:14:59 +0000
commit0a8e5093c352cc26933f39ac4a8b1cfbff15f89c (patch)
treea2afe32ddc5d6abe9a5b1e75b2c4fb35a5891897
parent9a37f4a7be465a3c6325d97de18d6133d805f9f5 (diff)
still do cycle_start() & cycle_end() calls when freewheeling
git-svn-id: svn://localhost/ardour2/branches/3.0@3440 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/audioengine.cc26
1 files changed, 15 insertions, 11 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 8bbed46733..a3f5eb9fd1 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -321,6 +321,13 @@ AudioEngine::process_callback (nframes_t nframes)
return 0;
}
+ boost::shared_ptr<Ports> p = ports.reader();
+
+ // Prepare ports (ie read data if necessary)
+ for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
+ (*i)->cycle_start (nframes, 0);
+ }
+
if (_freewheeling) {
/* emit the Freewheel signal and stop freewheeling in the event of trouble */
if (Freewheel (nframes)) {
@@ -328,18 +335,11 @@ AudioEngine::process_callback (nframes_t nframes)
_freewheeling = false;
jack_set_freewheel (_jack, false);
}
- return 0;
- }
- boost::shared_ptr<Ports> p = ports.reader();
-
- // Prepare ports (ie read data if necessary)
- for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
- (*i)->cycle_start (nframes, 0);
- }
-
- if (session) {
- session->process (nframes);
+ } else {
+ if (session) {
+ session->process (nframes);
+ }
}
// Finalize ports (ie write data if necessary)
@@ -348,6 +348,10 @@ AudioEngine::process_callback (nframes_t nframes)
(*i)->cycle_end (nframes, 0);
}
+ if (_freewheeling) {
+ return 0;
+ }
+
if (!_running) {
_processed_frames = next_processed_frames;
return 0;