diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-07-21 14:29:35 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 11:40:53 -0400 |
commit | 9885f04fe6e69bce59271aaa98998b7331153bc0 (patch) | |
tree | c3e43e1c20177becfa9ed6ec51bace5eb94cdf3f /libs/ardour/track.cc | |
parent | dc4f730ac95837590e8305f69778d1049e4a545e (diff) |
tweaks to disk io point mechanisms
Diffstat (limited to 'libs/ardour/track.cc')
-rw-r--r-- | libs/ardour/track.cc | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 481da6f22c..72948b4a98 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -1522,25 +1522,51 @@ Track::use_captured_audio_sources (SourceList& srcs, CaptureInfos const & captur __attribute__((annotate("realtime"))) #endif void -Track::setup_invisible_processors_oh_children_of_mine (ProcessorList& new_processors) +Track::setup_invisible_processors_oh_children_of_mine (ProcessorList& processors) { ProcessorList::iterator insert_pos; switch (_disk_io_point) { case DiskIOPreFader: - insert_pos = find (new_processors.begin(), new_processors.end(), _trim); - if (insert_pos != new_processors.end()) { - insert_pos = new_processors.insert (insert_pos, _disk_writer); - new_processors.insert (insert_pos, _disk_reader); + insert_pos = find (processors.begin(), processors.end(), _trim); + if (insert_pos != processors.end()) { + insert_pos = processors.insert (insert_pos, _disk_writer); + processors.insert (insert_pos, _disk_reader); } break; case DiskIOPostFader: - insert_pos = find (new_processors.begin(), new_processors.end(), _main_outs); - if (insert_pos != new_processors.end()) { - insert_pos = new_processors.insert (insert_pos, _disk_writer); - new_processors.insert (insert_pos, _disk_reader); + insert_pos = find (processors.begin(), processors.end(), _main_outs); + if (insert_pos != processors.end()) { + insert_pos = processors.insert (insert_pos, _disk_writer); + processors.insert (insert_pos, _disk_reader); } case DiskIOCustom: break; } } + +void +Track::set_disk_io_position (DiskIOPoint diop) +{ + bool display = false; + + switch (diop) { + case DiskIOCustom: + display = true; + break; + default: + display = false; + } + + _disk_writer->set_display_to_user (display); + _disk_reader->set_display_to_user (display); + + const bool changed = (diop != _disk_io_point); + + _disk_io_point = diop; + + if (changed) { + Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); + configure_processors (0); + } +} |