From 1b1d6e767b742eebe879e9ec08a214eff250caf8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 13 May 2024 19:38:21 +0200 Subject: [PATCH 1/3] Include YTK in doxygen doc --- doc/Doxyfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/Doxyfile b/doc/Doxyfile index 5ee5f82918..11593fba0e 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -778,7 +778,11 @@ INPUT = ../libs/ardour \ ../libs/widgets \ ../libs/zita-convolver \ ../libs/zita-resampler \ + ../libs/zita-resampler \ ../gtk2_ardour \ + ../libs/tk/ytkmm/ytkmm/gtkmm \ + ../libs/tk/ydkmm/ydkmm/gdkmm \ + ../libs/tk/ydk/ydk/gdk \ mainpage.txt ## audiographer assumes it's documented separately (has it's own @mainpage) From 68d3be891813cebb082b47ab7c79f905d679a14b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 13 May 2024 21:32:10 +0200 Subject: [PATCH 2/3] Support querying disk space for disks > 16TB under the hood `fsblkcnt_t` is used. --- libs/ardour/ardour/session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index bfddd4c6a6..fa61c27f32 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -2113,7 +2113,7 @@ private: std::vector session_dirs; std::vector::iterator last_rr_session_dir; - uint32_t _total_free_4k_blocks; + uint64_t _total_free_4k_blocks; /** If this is true, _total_free_4k_blocks is not definite, as one or more of the session directories' filesystems could not report free space. From 6b8018d927c042d75fab5e90bc8f8aee09806bd8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 13 May 2024 21:54:18 +0200 Subject: [PATCH 3/3] Indicate remaining record time for FLAC with >= --- gtk2_ardour/ardour_ui.cc | 4 ++++ gtk2_ardour/rec_info_box.cc | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 0cb673d745..d94fc6a80b 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1432,6 +1432,10 @@ ARDOUR_UI::format_disk_space_label (float remain_sec) std::string label = string_compose (X_("%1: "), _("Rec")); + if (_session && FLAC == _session->config.get_native_file_header_format () && remain_sec <= 86400) { + label += u8"\u2265"; // Greater-Than or Equal To + } + if (remain_sec > 86400) { disk_space_label.set_markup (label + _(">24h")); } else if (remain_sec > 32400 /* 9 hours */) { diff --git a/gtk2_ardour/rec_info_box.cc b/gtk2_ardour/rec_info_box.cc index 3d1cfd3951..ca51813429 100644 --- a/gtk2_ardour/rec_info_box.cc +++ b/gtk2_ardour/rec_info_box.cc @@ -340,20 +340,23 @@ RemainInfoBox::render (Cairo::RefPtr const& cr, cairo_rectangle_ float remain_sec = samples / (float)sample_rate; char buf[32]; + bool at_least = FLAC == _session->config.get_native_file_header_format (); + const char* prefix = at_least ? u8"\u2265" : ""; // Greater-Than or Equal To + if (remain_sec > 86400) { _layout_value->set_text (_(">24h")); } else if (remain_sec > 32400 /* 9 hours */) { - snprintf (buf, sizeof (buf), "%.0f", remain_sec / 3600.f); + snprintf (buf, sizeof (buf), "%s%.0f", prefix, remain_sec / 3600.f); _layout_value->set_text (std::string (buf) + S_("hours|h")); } else if (remain_sec > 5940 /* 99 mins */) { - snprintf (buf, sizeof (buf), "%.1f", remain_sec / 3600.f); + snprintf (buf, sizeof (buf), "%s%.1f", prefix, remain_sec / 3600.f); _layout_value->set_text (std::string (buf) + S_("hours|h")); } else if (remain_sec > 60*3 /* 3 mins */) { - snprintf (buf, sizeof (buf), "%.0f", remain_sec / 60.f); + snprintf (buf, sizeof (buf), "%s%.0f", prefix, remain_sec / 60.f); _layout_value->set_text (std::string (buf) + S_("minutes|m")); } else { Gtkmm2ext::set_source_rgb_a (cr, UIConfiguration::instance ().color ("alert:red"), .7); - snprintf (buf, sizeof (buf), "%.0f", remain_sec / 60.f); + snprintf (buf, sizeof (buf), "%s%.0f", prefix, remain_sec / 60.f); _layout_value->set_text (std::string (buf) + S_("minutes|m")); } }