summaryrefslogtreecommitdiff
path: root/libs/ardour/transport_master_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/transport_master_manager.cc')
-rw-r--r--libs/ardour/transport_master_manager.cc33
1 files changed, 29 insertions, 4 deletions
diff --git a/libs/ardour/transport_master_manager.cc b/libs/ardour/transport_master_manager.cc
index eb39fc2507..4911b981bb 100644
--- a/libs/ardour/transport_master_manager.cc
+++ b/libs/ardour/transport_master_manager.cc
@@ -40,6 +40,7 @@ TransportMasterManager::TransportMasterManager()
, _master_position (0)
, _session (0)
, _master_invalid_this_cycle (false)
+ , disk_output_blocked (false)
, master_dll_initstate (0)
{
}
@@ -124,7 +125,7 @@ TransportMasterManager::parameter_changed (std::string const & what)
if (what == "external-sync") {
if (!_session->config.get_external_sync()) {
/* disabled */
- DiskReader::dec_no_disk_output ();
+ unblock_disk_output ();
}
}
}
@@ -255,12 +256,12 @@ TransportMasterManager::pre_process_transport_masters (pframes_t nframes, sample
if (!_session->actively_recording()) {
DEBUG_TRACE (DEBUG::Slave, string_compose ("slave delta %1 greater than slave resolution %2 => no disk output\n", delta, _current_master->resolution()));
/* run routes as normal, but no disk output */
- DiskReader::inc_no_disk_output ();
+ block_disk_output ();
} else {
- DiskReader::dec_no_disk_output ();
+ unblock_disk_output ();
}
} else {
- DiskReader::dec_no_disk_output ();
+ unblock_disk_output ();
}
/* inject DLL with new data */
@@ -665,3 +666,27 @@ TransportMasterManager::reconnect_ports ()
}
}
}
+
+void
+TransportMasterManager::block_disk_output ()
+{
+ if (!disk_output_blocked) {
+ //DiskReader::inc_no_disk_output ();
+ disk_output_blocked = true;
+ }
+}
+
+void
+TransportMasterManager::unblock_disk_output ()
+{
+ if (disk_output_blocked) {
+ //DiskReader::dec_no_disk_output ();
+ disk_output_blocked = false;
+ }
+}
+
+void
+TransportMasterManager::reinit (double speed, samplepos_t pos)
+{
+ init_transport_master_dll (speed, pos);
+}