From: Paul Davis Date: Fri, 27 May 2011 01:04:56 +0000 (+0000) Subject: somewhat illogical and temporary workaround to the problems with consolidate & bounce... X-Git-Tag: 3.0-alpha5~1 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=f87baef1e73e21fb4f82558dbd4b5450b237b732;p=ardour.git 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 --- 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 @@ - + + @@ -577,11 +578,16 @@ + + + + - + + @@ -590,18 +596,14 @@ - - - - - + - + 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); - 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 (&(*i)->get_time_axis_view()); - boost::shared_ptr track = boost::dynamic_pointer_cast (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 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 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 (*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 ();