13
0

L: set a fixed-size for file format, and prevent changes if any track armed

This commit is contained in:
Ben Loftis 2024-06-28 10:05:30 -05:00
parent 76877483a5
commit 18f68d8f5f
2 changed files with 13 additions and 0 deletions

View File

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

View File

@ -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<RouteList> rl = _session->get_tracks ();
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
std::shared_ptr<Track> t = std::dynamic_pointer_cast<Track> (*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 ();