summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-11-23 00:09:46 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-23 00:09:46 -0700
commitd04c9b32444b01e9c29d603c6301843003986c4a (patch)
tree7b32cf3ec8855399fc0922b3f67e324dba8e65cc
parent1a2665e25fc8b01e2b7ca155259d53bc92c544b6 (diff)
more tweaks to correctly (or more correctly) reload disk reader buffers when loop fade choice changes
-rw-r--r--libs/ardour/disk_reader.cc2
-rw-r--r--libs/ardour/session.cc12
-rw-r--r--libs/ardour/session_state.cc4
3 files changed, 12 insertions, 6 deletions
diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc
index b4ffba834e..03e3b50d59 100644
--- a/libs/ardour/disk_reader.cc
+++ b/libs/ardour/disk_reader.cc
@@ -794,6 +794,8 @@ DiskReader::audio_read (PBD::PlaybackBuffer<Sample>*rb,
/* Looping: do something (maybe) about the loop boundaries */
+ cerr << name() << " Read with lfc = " << enum_2_string (Config->get_loop_fade_choice()) << endl;
+
switch (Config->get_loop_fade_choice()) {
case NoLoopFade:
break;
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 79bf3b31e2..980dec8dcf 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1415,15 +1415,15 @@ Session::auto_loop_changed (Location* location)
const bool rolling = transport_rolling ();
- if (rolling) {
+ boost::shared_ptr<RouteList> r = routes.reader ();
- if (play_loop) {
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
+ (*i)->reload_loop ();
+ }
- boost::shared_ptr<RouteList> r = routes.reader ();
+ if (rolling) {
- for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
- (*i)->reload_loop ();
- }
+ if (play_loop) {
if (_transport_sample < location->start() || _transport_sample > location->end()) {
// new loop range excludes current transport
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 5222c85a8e..12d2c706ea 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -4148,6 +4148,10 @@ Session::config_changed (std::string p, bool ours)
remove_monitor_section ();
}
}
+ } else if (p == "loop-fade-choice") {
+ cerr << "LFC change, change auto-loop\n";
+ last_loopend = 0; /* force locate to refill buffers with new loop boundary data */
+ auto_loop_changed (_locations->auto_loop_location());
}
set_dirty ();