summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_export_audio.cc
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/editor_export_audio.cc
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/editor_export_audio.cc')
-rw-r--r--gtk2_ardour/editor_export_audio.cc20
1 files changed, 19 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;