region markers: change container type that holds Source::_cue_markers from vector to set, to avoid duplicates

This commit is contained in:
Paul Davis
2021-05-14 07:47:48 -06:00
parent bfd00f7a52
commit 0f406f40f7
2 changed files with 2 additions and 2 deletions

View File

@@ -409,7 +409,7 @@ class CueMarker {
samplepos_t _position;
};
typedef std::vector<CueMarker> CueMarkers;
typedef std::set<CueMarker> CueMarkers;
/*
Slowest = 6.6dB/sec falloff at update rate of 40ms

View File

@@ -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));
}
}
}