summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 9267832cb1..f78a26cc05 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -143,6 +143,7 @@ Session::Session (AudioEngine &eng,
, _all_route_group (new RouteGroup (*this, "all"))
, routes (new RouteList)
, _total_free_4k_blocks (0)
+ , _total_free_4k_blocks_uncertain (false)
, _bundles (new BundleList)
, _bundle_xml_node (0)
, _current_trans (0)
@@ -3501,9 +3502,16 @@ Session::graph_reordered ()
}
}
-framecnt_t
+/** @return Number of frames that there is disk space available to write,
+ * if known.
+ */
+boost::optional<framecnt_t>
Session::available_capture_duration ()
{
+ if (_total_free_4k_blocks_uncertain) {
+ return boost::optional<framecnt_t> ();
+ }
+
float sample_bytes_on_disk = 4.0; // keep gcc happy
switch (config.get_native_file_data_format()) {