diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index cdb91e8ccd..cc843260ba 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -395,6 +395,21 @@ SndFileSource::open () } } #endif + if (!writable()) { + cerr << "Check for cues with " << _sndfile << endl; + uint32_t cc; + if (sf_command (_sndfile, SFC_GET_CUE_COUNT, &cc, sizeof (cc)) == SF_TRUE) { + cerr << "cc is " << cc << endl; + } + + SF_CUES cues; + 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)); + } + } + } if (!_broadcast_info) { _broadcast_info = new BroadcastInfo;