From 18f68d8f5f6f921ab60db32794f0fcacba505cbb Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Fri, 28 Jun 2024 10:05:30 -0500 Subject: [PATCH] L: set a fixed-size for file format, and prevent changes if any track armed --- gtk2_ardour/ardour_ui.cc | 2 ++ gtk2_ardour/ardour_ui_dependents.cc | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 03c6beab5b..cd7c24d8a7 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1551,6 +1551,8 @@ ARDOUR_UI::update_disk_space() samples /= rec_enabled_streams; } + livetrax_ff_dropdown->set_sensitive (!rec_enabled_streams); + format_disk_space_label (samples / (float)fr); } diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 4bdd2ce8b3..e777c75f22 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -436,6 +436,7 @@ ARDOUR_UI::livetrax_setup_windows () ev_timecode->add (timecode_format_label); livetrax_ff_dropdown = manage (new ArdourDropdown ()); + set_size_request_to_display_given_text(*livetrax_ff_dropdown, ("24 bit WAV/RF64 +++"), 0, 0); Menu_Helpers::MenuList& items (livetrax_ff_dropdown->items()); items.push_back (MenuElem (_("24 bit WAV/RF64"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::livetrax_set_file_format), LiveTraxFileFormat (ARDOUR::FormatInt24, ARDOUR::RF64_WAV)))); items.push_back (MenuElem (_("24 bit FLAC"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::livetrax_set_file_format), LiveTraxFileFormat (ARDOUR::FormatInt24, ARDOUR::FLAC)))); @@ -877,6 +878,16 @@ ARDOUR_UI::livetrax_set_file_format (LiveTraxFileFormat const & ff) return; } + /* bail out if any track is armed */ + std::shared_ptr rl = _session->get_tracks (); + for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) { + std::shared_ptr t = std::dynamic_pointer_cast (*r); + assert (t); + if (t->rec_enable_control()->get_value()) { + return; + } + } + /* Don't reset write sources on header format change */ _session->disable_file_format_reset ();