13
0

tentative code to check that we can read cue markers vis libsndfile

This commit is contained in:
Paul Davis 2021-05-13 17:56:10 -06:00
parent 297760885c
commit 8fc8cbf4af

View File

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