Lines Matching refs:cuesheet
124 static FLAC__uint64 local__find_closest_cue_(const FLAC__StreamMetadata_CueSheet *cuesheet, unsigned track, unsigned index, FLAC__uint64 total_samples, FLAC__bool look_forward)
128 for(t = 0; t < (int)cuesheet->num_tracks; t++)
129 for(i = 0; i < (int)cuesheet->tracks[t].num_indices; i++)
130 if(cuesheet->tracks[t].number > track || (cuesheet->tracks[t].number == track && cuesheet->tracks[t].indices[i].number >= index))
131 return cuesheet->tracks[t].offset + cuesheet->tracks[t].indices[i].offset;
135 for(t = (int)cuesheet->num_tracks - 1; t >= 0; t--)
136 for(i = (int)cuesheet->tracks[t].num_indices - 1; i >= 0; i--)
137 if(cuesheet->tracks[t].number < track || (cuesheet->tracks[t].number == track && cuesheet->tracks[t].indices[i].number <= index))
138 return cuesheet->tracks[t].offset + cuesheet->tracks[t].indices[i].offset;
252 void flac__utils_canonicalize_cue_specification(const utils__CueSpecification *cue_spec, const FLAC__StreamMetadata_CueSheet *cuesheet, FLAC__uint64 total_samples, utils__SkipUntilSpecification *skip_spec, utils__SkipUntilSpecification *until_spec)
255 FLAC__ASSERT(0 != cuesheet);
267 skip_spec->value.samples = local__find_closest_cue_(cuesheet, cue_spec->start_track, cue_spec->start_index, total_samples, /*look_forward=*/false);
272 until_spec->value.samples = local__find_closest_cue_(cuesheet, cue_spec->end_track, cue_spec->end_index, total_samples, /*look_forward=*/true);