Lines Matching refs:num_tracks
325 object->length += object->data.cue_sheet.num_tracks * ( in cuesheet_calculate_length_()
335 for(i = 0; i < object->data.cue_sheet.num_tracks; i++) { in cuesheet_calculate_length_()
351 static FLAC__StreamMetadata_CueSheet_Track *cuesheet_track_array_new_(unsigned num_tracks) in cuesheet_track_array_new_() argument
353 FLAC__ASSERT(num_tracks > 0); in cuesheet_track_array_new_()
355 …return (FLAC__StreamMetadata_CueSheet_Track*)safe_calloc_(num_tracks, sizeof(FLAC__StreamMetadata_… in cuesheet_track_array_new_()
358 …uesheet_track_array_delete_(FLAC__StreamMetadata_CueSheet_Track *object_array, unsigned num_tracks) in cuesheet_track_array_delete_() argument
362 FLAC__ASSERT(0 != object_array && num_tracks > 0); in cuesheet_track_array_delete_()
364 for(i = 0; i < num_tracks; i++) { in cuesheet_track_array_delete_()
375 …eet_track_array_copy_(const FLAC__StreamMetadata_CueSheet_Track *object_array, unsigned num_tracks) in cuesheet_track_array_copy_() argument
380 FLAC__ASSERT(num_tracks > 0); in cuesheet_track_array_copy_()
382 return_array = cuesheet_track_array_new_(num_tracks); in cuesheet_track_array_copy_()
387 for(i = 0; i < num_tracks; i++) { in cuesheet_track_array_copy_()
389 cuesheet_track_array_delete_(return_array, num_tracks); in cuesheet_track_array_copy_()
587 if(object->data.cue_sheet.num_tracks == 0) { in FLAC__metadata_object_clone()
592 …cks = cuesheet_track_array_copy_(object->data.cue_sheet.tracks, object->data.cue_sheet.num_tracks); in FLAC__metadata_object_clone()
663 FLAC__ASSERT(object->data.cue_sheet.num_tracks > 0); in FLAC__metadata_object_delete_data()
664 cuesheet_track_array_delete_(object->data.cue_sheet.tracks, object->data.cue_sheet.num_tracks); in FLAC__metadata_object_delete_data()
799 if(block1->num_tracks != block2->num_tracks) in compare_block_data_cuesheet_()
803 FLAC__ASSERT(block1->num_tracks > 0); in compare_block_data_cuesheet_()
804 for(i = 0; i < block1->num_tracks; i++) { in compare_block_data_cuesheet_()
1473 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_track_resize_indices()
1518 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_track_insert_index()
1547 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_track_delete_index()
1566 FLAC__ASSERT(object->data.cue_sheet.num_tracks == 0); in FLAC__metadata_object_cuesheet_resize_tracks()
1573 …const size_t old_size = object->data.cue_sheet.num_tracks * sizeof(FLAC__StreamMetadata_CueSheet_T… in FLAC__metadata_object_cuesheet_resize_tracks()
1580 FLAC__ASSERT(object->data.cue_sheet.num_tracks > 0); in FLAC__metadata_object_cuesheet_resize_tracks()
1583 if(new_num_tracks < object->data.cue_sheet.num_tracks) { in FLAC__metadata_object_cuesheet_resize_tracks()
1585 for(i = new_num_tracks; i < object->data.cue_sheet.num_tracks; i++) in FLAC__metadata_object_cuesheet_resize_tracks()
1599 … memset(object->data.cue_sheet.tracks + object->data.cue_sheet.num_tracks, 0, new_size - old_size); in FLAC__metadata_object_cuesheet_resize_tracks()
1602 object->data.cue_sheet.num_tracks = new_num_tracks; in FLAC__metadata_object_cuesheet_resize_tracks()
1611 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_set_track()
1622 FLAC__ASSERT(track_num <= object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_insert_track()
1626 if(!FLAC__metadata_object_cuesheet_resize_tracks(object, cs->num_tracks+1)) in FLAC__metadata_object_cuesheet_insert_track()
1630 … &cs->tracks[track_num], sizeof(FLAC__StreamMetadata_CueSheet_Track)*(cs->num_tracks-1-track_num)); in FLAC__metadata_object_cuesheet_insert_track()
1650 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_delete_track()
1659 …cs->tracks[track_num+1], sizeof(FLAC__StreamMetadata_CueSheet_Track)*(cs->num_tracks-track_num-1)); in FLAC__metadata_object_cuesheet_delete_track()
1660 cs->tracks[cs->num_tracks-1].num_indices = 0; in FLAC__metadata_object_cuesheet_delete_track()
1661 cs->tracks[cs->num_tracks-1].indices = 0; in FLAC__metadata_object_cuesheet_delete_track()
1663 return FLAC__metadata_object_cuesheet_resize_tracks(object, cs->num_tracks-1); in FLAC__metadata_object_cuesheet_delete_track()
1676 if (track >= (cs->num_tracks-1) || cs->tracks[track].num_indices < 1) in get_index_01_offset_()
1708 if (cs->num_tracks < 2) /* need at least one real track and the lead-out track */ in FLAC__metadata_object_cuesheet_calculate_cddb_id()
1713 for (i = 0; i < (cs->num_tracks-1); i++) /* -1 to avoid counting the lead-out */ in FLAC__metadata_object_cuesheet_calculate_cddb_id()
1715 …length = (FLAC__uint32)((cs->tracks[cs->num_tracks-1].offset+cs->lead_in) / 44100) - (FLAC__uint32… in FLAC__metadata_object_cuesheet_calculate_cddb_id()
1717 return (sum % 0xFF) << 24 | length << 8 | (FLAC__uint32)(cs->num_tracks-1); in FLAC__metadata_object_cuesheet_calculate_cddb_id()