tweaks to disk io point mechanisms

This commit is contained in:
Paul Davis 2017-07-21 14:29:35 -04:00
parent dc4f730ac9
commit 9885f04fe6
4 changed files with 39 additions and 9 deletions

View File

@ -186,6 +186,7 @@ class LIBARDOUR_API Track : public Route, public Recordable
void adjust_capture_buffering ();
void set_disk_io_position (DiskIOPoint);
DiskIOPoint disk_io_point() const { return _disk_io_point; }
PBD::Signal0<void> FreezeChange;
PBD::Signal0<void> PlaylistChanged;

View File

@ -65,6 +65,7 @@ DiskIOProcessor::DiskIOProcessor (Session& s, string const & str, Flag f)
, _frames_read_from_ringbuffer (0)
{
midi_interpolation.add_channel_to (0,0);
set_display_to_user (false);
}
void
@ -428,3 +429,4 @@ DiskIOProcessor::get_location_times(const Location* location,
*length = *end - *start;
}
}

View File

@ -1479,3 +1479,4 @@ DiskReader::set_no_disk_output (bool yn)
*/
no_disk_output = yn;
}

View File

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