mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Add warning if export truncates the channel-count
This commit is contained in:
parent
82d7d85192
commit
c1b72a289f
3 changed files with 33 additions and 0 deletions
|
|
@ -114,6 +114,12 @@ PortExportChannelSelector::sync_with_manager ()
|
||||||
channel_view.set_config (state->config);
|
channel_view.set_config (state->config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
PortExportChannelSelector::channel_limit_reached () const
|
||||||
|
{
|
||||||
|
return channel_view.max_route_channel_count () > channel_view.channel_count ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PortExportChannelSelector::fill_route_list ()
|
PortExportChannelSelector::fill_route_list ()
|
||||||
{
|
{
|
||||||
|
|
@ -457,6 +463,22 @@ PortExportChannelSelector::ChannelTreeView::update_selection_text (std::string c
|
||||||
update_config ();
|
update_config ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
PortExportChannelSelector::ChannelTreeView::max_route_channel_count () const
|
||||||
|
{
|
||||||
|
uint32_t rv = 0;
|
||||||
|
for (Gtk::ListStore::Children::const_iterator it = route_list->children().begin(); it != route_list->children().end(); ++it) {
|
||||||
|
Gtk::TreeModel::Row row = *it;
|
||||||
|
if (!row[route_cols.selected]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ARDOUR::IO* io = row[route_cols.io];
|
||||||
|
uint32_t outs = io->n_ports().n_audio();
|
||||||
|
rv = std::max (rv, outs);
|
||||||
|
}
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
RegionExportChannelSelector::RegionExportChannelSelector (ARDOUR::Session * _session,
|
RegionExportChannelSelector::RegionExportChannelSelector (ARDOUR::Session * _session,
|
||||||
ProfileManagerPtr manager,
|
ProfileManagerPtr manager,
|
||||||
ARDOUR::AudioRegion const & region,
|
ARDOUR::AudioRegion const & region,
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ public:
|
||||||
virtual ~ExportChannelSelector () {}
|
virtual ~ExportChannelSelector () {}
|
||||||
|
|
||||||
virtual void sync_with_manager () = 0;
|
virtual void sync_with_manager () = 0;
|
||||||
|
virtual bool channel_limit_reached () const = 0;
|
||||||
|
|
||||||
sigc::signal<void> CriticalSelectionChanged;
|
sigc::signal<void> CriticalSelectionChanged;
|
||||||
};
|
};
|
||||||
|
|
@ -90,6 +91,7 @@ public:
|
||||||
~PortExportChannelSelector ();
|
~PortExportChannelSelector ();
|
||||||
|
|
||||||
void sync_with_manager ();
|
void sync_with_manager ();
|
||||||
|
bool channel_limit_reached () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
@ -183,6 +185,8 @@ private:
|
||||||
void clear_routes () { route_list->clear (); }
|
void clear_routes () { route_list->clear (); }
|
||||||
void add_route (ARDOUR::IO * route);
|
void add_route (ARDOUR::IO * route);
|
||||||
void set_channel_count (uint32_t channels);
|
void set_channel_count (uint32_t channels);
|
||||||
|
uint32_t channel_count () const { return n_channels; }
|
||||||
|
uint32_t max_route_channel_count () const;
|
||||||
|
|
||||||
sigc::signal<void> CriticalSelectionChanged;
|
sigc::signal<void> CriticalSelectionChanged;
|
||||||
|
|
||||||
|
|
@ -220,6 +224,7 @@ public:
|
||||||
ARDOUR::AudioTrack & track);
|
ARDOUR::AudioTrack & track);
|
||||||
|
|
||||||
virtual void sync_with_manager ();
|
virtual void sync_with_manager ();
|
||||||
|
bool channel_limit_reached () const { return false; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
@ -250,6 +255,7 @@ class TrackExportChannelSelector : public ExportChannelSelector
|
||||||
virtual void sync_with_manager ();
|
virtual void sync_with_manager ();
|
||||||
|
|
||||||
bool track_output () const { return track_output_button.get_active(); }
|
bool track_output () const { return track_output_button.get_active(); }
|
||||||
|
bool channel_limit_reached () const { return false; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -274,6 +274,11 @@ ExportDialog::update_warnings_and_example_filename ()
|
||||||
add_warning (*it);
|
add_warning (*it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* add channel count warning */
|
||||||
|
if (channel_selector && channel_selector->channel_limit_reached ()) {
|
||||||
|
add_warning (_("A track or bus has more channels than the target."));
|
||||||
|
}
|
||||||
|
|
||||||
if (!warnings->conflicting_filenames.empty()) {
|
if (!warnings->conflicting_filenames.empty()) {
|
||||||
list_files_hbox.show ();
|
list_files_hbox.show ();
|
||||||
for (std::list<string>::iterator it = warnings->conflicting_filenames.begin(); it != warnings->conflicting_filenames.end(); ++it) {
|
for (std::list<string>::iterator it = warnings->conflicting_filenames.begin(); it != warnings->conflicting_filenames.end(); ++it) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue