diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_export_audio.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 26 |
2 files changed, 45 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc index 59109c508e..928a9809bc 100644 --- a/gtk2_ardour/editor_export_audio.cc +++ b/gtk2_ardour/editor_export_audio.cc @@ -25,6 +25,8 @@ #include <gtkmm/messagedialog.h> +#include "gtkmm2ext/choice.h" + #include "export_dialog.h" #include "editor.h" #include "public_editor.h" @@ -139,9 +141,25 @@ Editor::bounce_region_selection () { for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) { + RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&(*i)->get_time_axis_view()); + boost::shared_ptr<Track> track = boost::dynamic_pointer_cast<Track> (rtv->route()); + + if (!track->bounceable()) { + MessageDialog d ( + _("One or more of the selected regions' tracks cannot be bounced because it has more outputs than inputs. " + "You can fix this by increasing the number of inputs on that track.") + ); + d.set_title (_("Cannot bounce")); + d.run (); + return; + } + } + + for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) { + boost::shared_ptr<Region> region ((*i)->region()); RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view()); - Track* track = dynamic_cast<Track*>(rtv->route().get()); + boost::shared_ptr<Track> track = boost::dynamic_pointer_cast<Track> (rtv->route()); InterThreadInfo itt; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 4bf5a70cd8..77b2f40bcc 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -3547,6 +3547,19 @@ Editor::freeze_route () return; } + if (!clicked_routeview->track()->bounceable()) { + RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (clicked_routeview); + if (rtv && !rtv->track()->bounceable()) { + MessageDialog d ( + _("This route cannot be frozen because it has more outputs than inputs. " + "You can fix this by increasing the number of inputs.") + ); + d.set_title (_("Cannot freeze")); + d.run (); + return; + } + } + InterThreadInfo itt; current_interthread_info = &itt; @@ -3573,6 +3586,19 @@ Editor::bounce_range_selection (bool replace, bool enable_processing) TrackSelection views = selection->tracks; + for (TrackViewList::iterator i = views.begin(); i != views.end(); ++i) { + RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i); + if (rtv && !rtv->track()->bounceable()) { + MessageDialog d ( + _("One or more selected tracks cannot be bounced because it has more outputs than inputs. " + "You can fix this by increasing the number of inputs on that track.") + ); + d.set_title (_("Cannot bounce")); + d.run (); + return; + } + } + framepos_t start = selection->time[clicked_selection].start; framepos_t end = selection->time[clicked_selection].end; framepos_t cnt = end - start + 1; |