13
0

put back revised version of Route::has_external_redirects() and use it to give a warning when attempting to freeze a track with sends/inserts/returns

git-svn-id: svn://localhost/ardour2/branches/3.0@11707 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-03-16 16:51:54 +00:00
parent 8b03f1790a
commit 416e3c701e
4 changed files with 43 additions and 3 deletions

View File

@ -3390,6 +3390,25 @@ Editor::freeze_route ()
return;
}
if (clicked_routeview->track()->has_external_redirects()) {
MessageDialog d (string_compose (_("<b>%1</b>\n\nThis track has at least one send/insert/return as part of its signal flow.\n\n"
"Freezing will only process the signal as far as the first send/insert/return."),
clicked_routeview->track()->name()), true, MESSAGE_INFO, BUTTONS_NONE, true);
d.add_button (_("Freeze anyway"), Gtk::RESPONSE_OK);
d.add_button (_("Don't freeze"), Gtk::RESPONSE_CANCEL);
d.set_title (_("Freeze Limits"));
int response = d.run ();
switch (response) {
case Gtk::RESPONSE_CANCEL:
return;
default:
break;
}
}
InterThreadInfo itt;
current_interthread_info = &itt;

View File

@ -423,6 +423,8 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
void sync_order_keys (std::string const &);
static PBD::Signal1<void,std::string const &> SyncOrderKeys;
bool has_external_redirects() const;
protected:
friend class Session;

View File

@ -4039,3 +4039,21 @@ Route::metering_state () const
{
return MeteringRoute;
}
bool
Route::has_external_redirects () const
{
for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
/* ignore inactive processors and obviously ignore the main
* outs since everything has them and we don't care.
*/
if ((*i)->active() && (*i) != _main_outs && (*i)->does_routing()) {
return true;;
}
}
return false;
}

View File

@ -3969,13 +3969,14 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
srcs.push_back (fsource);
}
/* tell redirects that care that we are about to use a much larger blocksize */
/* tell redirects that care that we are about to use a much larger
* blocksize. this will flush all plugins too, so that they are ready
* to be used for this process.
*/
need_block_size_reset = true;
track.set_block_size (chunk_size);
/* XXX need to flush all redirects */
position = start;
to_do = len;