From 0f406f40f7eab984c2f8ee4afbfe0ded4e001dd9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 14 May 2021 07:47:48 -0600 Subject: [PATCH] region markers: change container type that holds Source::_cue_markers from vector to set, to avoid duplicates --- libs/ardour/ardour/types.h | 2 +- libs/ardour/sndfilesource.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 7fdccac521..11d784079d 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -409,7 +409,7 @@ class CueMarker { samplepos_t _position; }; -typedef std::vector CueMarkers; +typedef std::set CueMarkers; /* Slowest = 6.6dB/sec falloff at update rate of 40ms diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index cc843260ba..0a66041ee5 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -406,7 +406,7 @@ SndFileSource::open () if (sf_command (_sndfile, SFC_GET_CUE, &cues, sizeof (SF_CUES)) == SF_TRUE) { cerr << "Found " << cues.cue_count << " cues !\n"; for (size_t n = 0; n < cues.cue_count; ++n) { - _cue_markers.push_back (CueMarker (string_compose (X_("cue %1"), n+1), cues.cue_points[n].sample_offset)); + _cue_markers.insert (CueMarker (string_compose (X_("cue %1"), n+1), cues.cue_points[n].sample_offset)); } } }