summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-12-10 22:28:29 +0000
committerCarl Hetherington <carl@carlh.net>2010-12-10 22:28:29 +0000
commit86ac707573a5f5124c4a26b4e48e9756415700c4 (patch)
tree58dda1c31bc0349578bd7ff674d539054180809d /gtk2_ardour
parent8387e1bff87e1bed31a807f993a001a967bca51a (diff)
Stop bounce / freeze on tracks that have more outputs than inputs and so cannot record all the outputs in their diskstreams. Fix buffer shortage when bouncing tracks whose processing chains temporarily need more buffers than there are inputs. Fixes #3573.
git-svn-id: svn://localhost/ardour2/branches/3.0@8239 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_export_audio.cc20
-rw-r--r--gtk2_ardour/editor_ops.cc26
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;