more tweaks to correctly (or more correctly) reload disk reader buffers when loop fade choice changes

This commit is contained in:
Paul Davis 2019-11-23 00:09:46 -07:00
parent 1a2665e25f
commit d04c9b3244
3 changed files with 12 additions and 6 deletions

View File

@ -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;

View File

@ -1415,16 +1415,16 @@ Session::auto_loop_changed (Location* location)
const bool rolling = transport_rolling ();
boost::shared_ptr<RouteList> r = routes.reader ();
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
(*i)->reload_loop ();
}
if (rolling) {
if (play_loop) {
boost::shared_ptr<RouteList> r = routes.reader ();
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
(*i)->reload_loop ();
}
if (_transport_sample < location->start() || _transport_sample > location->end()) {
// new loop range excludes current transport
// sample => relocate to beginning of loop and roll.

View File

@ -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 ();