summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-05-27 01:04:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-05-27 01:04:56 +0000
commitf87baef1e73e21fb4f82558dbd4b5450b237b732 (patch)
tree44d76bf56925f0767bc70a95a01e6e66ded5062b
parente4a92029267dfc2f3e5ceac069f32aed3c133233 (diff)
somewhat illogical and temporary workaround to the problems with consolidate & bounceable. it turns out that region bouncing never replaces the in-place region, so bounceable() doesn't matter; range bouncing only needs to check bounceable() if we're going to replace material in place and the op is with-processing. reword the error dialog too
git-svn-id: svn://localhost/ardour2/branches/3.0@9606 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour.menus.in18
-rw-r--r--gtk2_ardour/editor.h2
-rw-r--r--gtk2_ardour/editor_actions.cc3
-rw-r--r--gtk2_ardour/editor_export_audio.cc27
-rw-r--r--gtk2_ardour/editor_ops.cc7
5 files changed, 22 insertions, 35 deletions
diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in
index af423cbb23..8d21a4afa9 100644
--- a/gtk2_ardour/ardour.menus.in
+++ b/gtk2_ardour/ardour.menus.in
@@ -227,7 +227,8 @@
<menuitem action='remove-region-sync'/>
<menuitem action='play-selected-regions'/>
<menuitem action='export-region'/>
- <menuitem action='bounce-region'/>
+ <menuitem action='bounce-regions-processed'/>
+ <menuitem action='bounce-regions-unprocessed'/>
<menuitem action='combine-regions'/>
<menuitem action='uncombine-regions'/>
<menuitem action='analyze-region'/>
@@ -577,11 +578,16 @@
<popup name='PopupRegionMenu' action='PopupRegionMenu'>
<menuitem action='rename-region'/>
<menuitem action='show-region-properties'/>
+ <menuitem action='combine-regions'/>
+ <menuitem action='uncombine-regions'/>
+ <menuitem action='split-region'/>
+ <menuitem action='split-multichannel-region'/>
<menuitem action='set-region-sync-position'/>
<menuitem action='remove-region-sync'/>
<menuitem action='play-selected-regions'/>
<menuitem action='export-region'/>
- <menuitem action='bounce-region'/>
+ <menuitem action='bounce-regions-processed'/>
+ <menuitem action='bounce-regions-unprocessed'/>
<menuitem action='analyze-region'/>
<menuitem action='toggle-region-lock'/>
<menuitem action='toggle-region-lock-style'/>
@@ -590,18 +596,14 @@
<menuitem action='pitch-shift-region'/>
<menuitem action='transpose-region'/>
<menuitem action='naturalize-region'/>
- <menuitem action='combine-regions'/>
- <menuitem action='uncombine-regions'/>
- <menuitem action='split-region'/>
- <menuitem action='split-multichannel-region'/>
- <menuitem action='remove-region'/>
+ <menuitem action='reverse-region'/>
<menuitem action='loop-region'/>
<menuitem action='snap-regions-to-grid'/>
<menuitem action='close-region-gaps'/>
<menuitem action='place-transient' />
<menuitem action='show-rhythm-ferret'/>
<menuitem action='strip-region-silence'/>
- <menuitem action='reverse-region'/>
+ <menuitem action='remove-region'/>
<menu action='RegionMenuLayering'>
<menuitem action='raise-region-to-top'/>
<menuitem action='raise-region'/>
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 984d072f83..e0fc037054 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1751,7 +1751,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
int write_region_selection(RegionSelection&);
bool write_region (std::string path, boost::shared_ptr<ARDOUR::AudioRegion>);
- void bounce_region_selection ();
+ void bounce_region_selection (bool with_processing);
void bounce_range_selection (bool replace, bool enable_processing);
void external_edit_region ();
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index 74cc69e6db..d19bfe4fa1 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -1371,7 +1371,8 @@ Editor::register_region_actions ()
reg_sens (_region_actions, "play-selected-regions", _("Play"), sigc::mem_fun(*this, &Editor::play_selected_region));
- reg_sens (_region_actions, "bounce-region", _("Bounce"), sigc::mem_fun (*this, &Editor::bounce_region_selection));
+ reg_sens (_region_actions, "bounce-regions-unprocessed", _("Bounce (with processing)"), (sigc::bind (sigc::mem_fun (*this, &Editor::bounce_region_selection), true)));
+ reg_sens (_region_actions, "bounce-regions-processed", _("Bounce (without processing)"), (sigc::bind (sigc::mem_fun (*this, &Editor::bounce_region_selection), false)));
reg_sens (_region_actions, "combine-regions", _("Combine"), sigc::mem_fun (*this, &Editor::combine_regions));
reg_sens (_region_actions, "uncombine-regions", _("Uncombine"), sigc::mem_fun (*this, &Editor::uncombine_regions));
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 2eff80614e..3fb4a4b327 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -145,23 +145,11 @@ Editor::write_region_selection (RegionSelection& regions)
}
void
-Editor::bounce_region_selection ()
+Editor::bounce_region_selection (bool with_processing)
{
- 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;
- }
- }
+ /* no need to check for bounceable() because this operation never puts
+ * its results back in the playlist (only in the region list).
+ */
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
@@ -171,12 +159,7 @@ Editor::bounce_region_selection ()
InterThreadInfo itt;
- boost::shared_ptr<Region> r = track->bounce_range (region->position(), region->position() + region->length(), itt);
- cerr << "Result of bounce of "
- << region->name() << " len = " << region->length()
- << " was "
- << r->name() << " len = " << r->length()
- << endl;
+ boost::shared_ptr<Region> r = track->bounce_range (region->position(), region->position() + region->length(), itt, with_processing);
}
}
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 9e46c04eed..b986976f9e 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -3319,10 +3319,11 @@ Editor::bounce_range_selection (bool replace, bool enable_processing)
for (TrackViewList::iterator i = views.begin(); i != views.end(); ++i) {
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
- if (rtv && rtv->track() && !rtv->track()->bounceable()) {
+ if (rtv && rtv->track() && replace && enable_processing && !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.")
+ _("You can't perform this operation because the processing of the signal "
+ "will cause one or more of the tracks will end up with a region with more channels than this track has inputs.\n\n"
+ "You can do this without processing, which is a different operation.")
);
d.set_title (_("Cannot bounce"));
d.run ();