From 343b06d8d3522d6b017d887ca754c91aec2430fd Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 13 Apr 2014 10:29:07 -0400 Subject: dramatic change in logic and naming for operations related to adding a MIDI region on demand and cloning/unlinking Existing code would cause data loss due to creation of two Source objects referring the same path, one with removable flags and one without. Careful code review suggested a variety of thinkos, function naming problems and other confusion that caused this. I have tried ot extensively comment what is going on with these operations, because it is one key area in which MIDI differs from audio: with audio, capture is the only way to add a new audio region, but for MIDI there are GUI input events that can add a new region. --- libs/ardour/file_source.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/ardour/file_source.cc') diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index 2b8a65ab92..6dc6ad9500 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -520,7 +520,7 @@ FileSource::set_source_name (const string& newname, bool destructive) { Glib::Threads::Mutex::Lock lm (_lock); string oldpath = _path; - string newpath = _session.change_source_path_by_name (oldpath, _name, newname, destructive); + string newpath = _session.generate_new_source_path_from_name (oldpath, _name, newname, destructive); if (newpath.empty()) { error << string_compose (_("programming error: %1"), "cannot generate a changed file path") << endmsg; -- cgit v1.2.3