region markers: change container type that holds Source::_cue_markers from vector to set, to avoid duplicates
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user