View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006177 | ardour | bugs | public | 2015-02-20 14:02 | 2020-04-19 20:17 |
| Reporter | tlat | Assigned To | tlat | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0006177: audio_source_name_is_unique fails | ||||
| Description | git b68a4e5 Example: - new session - new stereo track (Audio 1) pathnames: Audio 1-1%L.wav Audio 1-1%R.wav - remove "Audio 1" track - new stereo track (again Audio 1) `audio_source_name_is_unique' works with "Audio 1-1%L.wav" and channel 0 but it fails with "Audio 1-1%R.wav" and channel 1 because "Audio 1-1%R.wav" is cached with channel 0. Side effect: if recording, there is a deleted file after quit. `audio_source_name_is_unique' is used only by `new_audio_source_path' for a new internal audio source. The channel seems useless and it causes the bug. The attached patch is a possible solution. | ||||
| Tags | No tags attached. | ||||
|
2015-02-20 14:02
|
audio_source_name_is_unique.patch (2,109 bytes)
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index ef0d5d9..50c4c22 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -193,7 +193,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
std::string peak_path (std::string) const;
std::string peak_path_from_audio_path (std::string) const;
- bool audio_source_name_is_unique (const std::string& name, uint32_t chan);
+ bool audio_source_name_is_unique (const std::string& name);
std::string format_audio_source_name (const std::string& legalized_base, uint32_t nchan, uint32_t chan, bool destructive, bool take_required, uint32_t cnt, bool related_exists);
std::string new_audio_source_path_for_embedded (const std::string& existing_path);
std::string new_audio_source_path (const std::string&, uint32_t nchans, uint32_t chan, bool destructive, bool take_required);
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 3bdee5d..1e1ea69 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3639,7 +3639,7 @@ Session::new_audio_source_path_for_embedded (const std::string& path)
}
bool
-Session::audio_source_name_is_unique (const string& name, uint32_t chan)
+Session::audio_source_name_is_unique (const string& name)
{
std::vector<string> sdirs = source_search_path (DataType::AUDIO);
vector<space_and_path>::iterator i;
@@ -3672,7 +3672,7 @@ Session::audio_source_name_is_unique (const string& name, uint32_t chan)
string possible_path = Glib::build_filename (spath, name);
- if (audio_source_by_path_and_channel (possible_path, chan)) {
+ if (audio_source_by_path_and_channel (possible_path, 0)) {
existing++;
break;
}
@@ -3740,7 +3740,7 @@ Session::new_audio_source_path (const string& base, uint32_t nchan, uint32_t cha
possible_name = format_audio_source_name (legalized, nchan, chan, destructive, take_required, cnt, some_related_source_name_exists);
- if (audio_source_name_is_unique (possible_name, chan)) {
+ if (audio_source_name_is_unique (possible_name)) {
break;
}
|
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-02-20 14:02 | tlat | New Issue | |
| 2015-02-20 14:02 | tlat | File Added: audio_source_name_is_unique.patch | |
| 2015-02-25 08:49 | tlat | Status | new => resolved |
| 2015-02-25 08:49 | tlat | Resolution | open => fixed |
| 2015-02-25 08:49 | tlat | Assigned To | => tlat |
| 2020-04-19 20:17 | system | Note Added: 0023405 | |
| 2020-04-19 20:17 | system | Status | resolved => closed |