Lines Matching refs:private_

259 	decoder->private_ = calloc(1, sizeof(FLAC__StreamDecoderPrivate));  in FLAC__stream_decoder_new()
260 if(decoder->private_ == 0) { in FLAC__stream_decoder_new()
266 decoder->private_->input = FLAC__bitreader_new(); in FLAC__stream_decoder_new()
267 if(decoder->private_->input == 0) { in FLAC__stream_decoder_new()
268 free(decoder->private_); in FLAC__stream_decoder_new()
274 decoder->private_->metadata_filter_ids_capacity = 16; in FLAC__stream_decoder_new()
275 …if(0 == (decoder->private_->metadata_filter_ids = malloc((FLAC__STREAM_METADATA_APPLICATION_ID_LEN… in FLAC__stream_decoder_new()
276 FLAC__bitreader_delete(decoder->private_->input); in FLAC__stream_decoder_new()
277 free(decoder->private_); in FLAC__stream_decoder_new()
284 decoder->private_->output[i] = 0; in FLAC__stream_decoder_new()
285 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in FLAC__stream_decoder_new()
288 decoder->private_->output_capacity = 0; in FLAC__stream_decoder_new()
289 decoder->private_->output_channels = 0; in FLAC__stream_decoder_new()
290 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_new()
293 …FLAC__format_entropy_coding_method_partitioned_rice_contents_init(&decoder->private_->partitioned_… in FLAC__stream_decoder_new()
295 decoder->private_->file = 0; in FLAC__stream_decoder_new()
312 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_delete()
313 FLAC__ASSERT(0 != decoder->private_->input); in FLAC__stream_decoder_delete()
317 if(0 != decoder->private_->metadata_filter_ids) in FLAC__stream_decoder_delete()
318 free(decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_delete()
320 FLAC__bitreader_delete(decoder->private_->input); in FLAC__stream_decoder_delete()
323 …FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(&decoder->private_->partitioned… in FLAC__stream_decoder_delete()
325 free(decoder->private_); in FLAC__stream_decoder_delete()
367 decoder->private_->is_ogg = is_ogg; in init_stream_internal_()
375 FLAC__cpu_info(&decoder->private_->cpuinfo); in init_stream_internal_()
377 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal; in init_stream_internal_()
378 decoder->private_->local_lpc_restore_signal_64bit = FLAC__lpc_restore_signal_wide; in init_stream_internal_()
379 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal; in init_stream_internal_()
382 if(decoder->private_->cpuinfo.use_asm) { in init_stream_internal_()
384 FLAC__ASSERT(decoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_IA32); in init_stream_internal_()
386 …decoder->private_->local_lpc_restore_signal_64bit = FLAC__lpc_restore_signal_wide_asm_ia32; /* OPT… in init_stream_internal_()
387 if(decoder->private_->cpuinfo.ia32.mmx) { in init_stream_internal_()
388 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
389 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32_mmx; in init_stream_internal_()
392 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
393 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
398 if(decoder->private_->cpuinfo.ia32.sse2) { in init_stream_internal_()
399 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_16_intrin_sse2; in init_stream_internal_()
403 if(decoder->private_->cpuinfo.ia32.sse41) { in init_stream_internal_()
404 decoder->private_->local_lpc_restore_signal_64bit = FLAC__lpc_restore_signal_wide_intrin_sse41; in init_stream_internal_()
409 FLAC__ASSERT(decoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_X86_64); in init_stream_internal_()
417 if(!FLAC__bitreader_init(decoder->private_->input, read_callback_, decoder)) { in init_stream_internal_()
422 decoder->private_->read_callback = read_callback; in init_stream_internal_()
423 decoder->private_->seek_callback = seek_callback; in init_stream_internal_()
424 decoder->private_->tell_callback = tell_callback; in init_stream_internal_()
425 decoder->private_->length_callback = length_callback; in init_stream_internal_()
426 decoder->private_->eof_callback = eof_callback; in init_stream_internal_()
427 decoder->private_->write_callback = write_callback; in init_stream_internal_()
428 decoder->private_->metadata_callback = metadata_callback; in init_stream_internal_()
429 decoder->private_->error_callback = error_callback; in init_stream_internal_()
430 decoder->private_->client_data = client_data; in init_stream_internal_()
431 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size = 0; in init_stream_internal_()
432 decoder->private_->samples_decoded = 0; in init_stream_internal_()
433 decoder->private_->has_stream_info = false; in init_stream_internal_()
434 decoder->private_->cached = false; in init_stream_internal_()
436 decoder->private_->do_md5_checking = decoder->protected_->md5_checking; in init_stream_internal_()
437 decoder->private_->is_seeking = false; in init_stream_internal_()
439 …decoder->private_->internal_reset_hack = true; /* so the following reset does not try to rewind th… in init_stream_internal_()
531 decoder->private_->file = file; in init_FILE_internal_()
536 decoder->private_->file == stdin? 0: file_seek_callback_, in init_FILE_internal_()
537 decoder->private_->file == stdin? 0: file_tell_callback_, in init_FILE_internal_()
538 decoder->private_->file == stdin? 0: file_length_callback_, in init_FILE_internal_()
635 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_finish()
644 FLAC__MD5Final(decoder->private_->computed_md5sum, &decoder->private_->md5context); in FLAC__stream_decoder_finish()
646 free(decoder->private_->seek_table.data.seek_table.points); in FLAC__stream_decoder_finish()
647 decoder->private_->seek_table.data.seek_table.points = 0; in FLAC__stream_decoder_finish()
648 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_finish()
650 FLAC__bitreader_free(decoder->private_->input); in FLAC__stream_decoder_finish()
658 if(0 != decoder->private_->output[i]) { in FLAC__stream_decoder_finish()
659 free(decoder->private_->output[i]-4); in FLAC__stream_decoder_finish()
660 decoder->private_->output[i] = 0; in FLAC__stream_decoder_finish()
662 if(0 != decoder->private_->residual_unaligned[i]) { in FLAC__stream_decoder_finish()
663 free(decoder->private_->residual_unaligned[i]); in FLAC__stream_decoder_finish()
664 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in FLAC__stream_decoder_finish()
667 decoder->private_->output_capacity = 0; in FLAC__stream_decoder_finish()
668 decoder->private_->output_channels = 0; in FLAC__stream_decoder_finish()
671 if(decoder->private_->is_ogg) in FLAC__stream_decoder_finish()
675 if(0 != decoder->private_->file) { in FLAC__stream_decoder_finish()
676 if(decoder->private_->file != stdin) in FLAC__stream_decoder_finish()
677 fclose(decoder->private_->file); in FLAC__stream_decoder_finish()
678 decoder->private_->file = 0; in FLAC__stream_decoder_finish()
681 if(decoder->private_->do_md5_checking) { in FLAC__stream_decoder_finish()
682 …if(memcmp(decoder->private_->stream_info.data.stream_info.md5sum, decoder->private_->computed_md5s… in FLAC__stream_decoder_finish()
685 decoder->private_->is_seeking = false; in FLAC__stream_decoder_finish()
697 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_ogg_serial_number()
724 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond()
732 decoder->private_->metadata_filter[type] = true; in FLAC__stream_decoder_set_metadata_respond()
734 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_respond()
741 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond_application()
747 if(decoder->private_->metadata_filter[FLAC__METADATA_TYPE_APPLICATION]) in FLAC__stream_decoder_set_metadata_respond_application()
750 FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_set_metadata_respond_application()
752 …if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity… in FLAC__stream_decoder_set_metadata_respond_application()
753 …if(0 == (decoder->private_->metadata_filter_ids = safe_realloc_mul_2op_(decoder->private_->metadat… in FLAC__stream_decoder_set_metadata_respond_application()
757 decoder->private_->metadata_filter_ids_capacity *= 2; in FLAC__stream_decoder_set_metadata_respond_application()
760 …memcpy(decoder->private_->metadata_filter_ids + decoder->private_->metadata_filter_ids_count * (FL… in FLAC__stream_decoder_set_metadata_respond_application()
761 decoder->private_->metadata_filter_ids_count++; in FLAC__stream_decoder_set_metadata_respond_application()
770 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond_all()
774 …for(i = 0; i < sizeof(decoder->private_->metadata_filter) / sizeof(decoder->private_->metadata_fil… in FLAC__stream_decoder_set_metadata_respond_all()
775 decoder->private_->metadata_filter[i] = true; in FLAC__stream_decoder_set_metadata_respond_all()
776 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_respond_all()
783 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore()
791 decoder->private_->metadata_filter[type] = false; in FLAC__stream_decoder_set_metadata_ignore()
793 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_ignore()
800 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore_application()
806 if(!decoder->private_->metadata_filter[FLAC__METADATA_TYPE_APPLICATION]) in FLAC__stream_decoder_set_metadata_ignore_application()
809 FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_set_metadata_ignore_application()
811 …if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity… in FLAC__stream_decoder_set_metadata_ignore_application()
812 …if(0 == (decoder->private_->metadata_filter_ids = safe_realloc_mul_2op_(decoder->private_->metadat… in FLAC__stream_decoder_set_metadata_ignore_application()
816 decoder->private_->metadata_filter_ids_capacity *= 2; in FLAC__stream_decoder_set_metadata_ignore_application()
819 …memcpy(decoder->private_->metadata_filter_ids + decoder->private_->metadata_filter_ids_count * (FL… in FLAC__stream_decoder_set_metadata_ignore_application()
820 decoder->private_->metadata_filter_ids_count++; in FLAC__stream_decoder_set_metadata_ignore_application()
828 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore_all()
832 memset(decoder->private_->metadata_filter, 0, sizeof(decoder->private_->metadata_filter)); in FLAC__stream_decoder_set_metadata_ignore_all()
833 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_ignore_all()
860 …return decoder->private_->has_stream_info? decoder->private_->stream_info.data.stream_info.total_s… in FLAC__stream_decoder_get_total_samples()
901 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_get_decode_position()
904 if(FLAC__HAS_OGG && decoder->private_->is_ogg) in FLAC__stream_decoder_get_decode_position()
907 if(0 == decoder->private_->tell_callback) in FLAC__stream_decoder_get_decode_position()
909 …if(decoder->private_->tell_callback(decoder, position, decoder->private_->client_data) != FLAC__ST… in FLAC__stream_decoder_get_decode_position()
912 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) in FLAC__stream_decoder_get_decode_position()
922 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_flush()
925 …if(!decoder->private_->internal_reset_hack && decoder->protected_->state == FLAC__STREAM_DECODER_U… in FLAC__stream_decoder_flush()
928 decoder->private_->samples_decoded = 0; in FLAC__stream_decoder_flush()
929 decoder->private_->do_md5_checking = false; in FLAC__stream_decoder_flush()
932 if(decoder->private_->is_ogg) in FLAC__stream_decoder_flush()
936 if(!FLAC__bitreader_clear(decoder->private_->input)) { in FLAC__stream_decoder_flush()
948 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_reset()
958 if(decoder->private_->is_ogg) in FLAC__stream_decoder_reset()
967 if(!decoder->private_->internal_reset_hack) { in FLAC__stream_decoder_reset()
968 if(decoder->private_->file == stdin) in FLAC__stream_decoder_reset()
970 …if(decoder->private_->seek_callback && decoder->private_->seek_callback(decoder, 0, decoder->priva… in FLAC__stream_decoder_reset()
974 decoder->private_->internal_reset_hack = false; in FLAC__stream_decoder_reset()
978 decoder->private_->has_stream_info = false; in FLAC__stream_decoder_reset()
980 free(decoder->private_->seek_table.data.seek_table.points); in FLAC__stream_decoder_reset()
981 decoder->private_->seek_table.data.seek_table.points = 0; in FLAC__stream_decoder_reset()
982 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_reset()
984 decoder->private_->do_md5_checking = decoder->protected_->md5_checking; in FLAC__stream_decoder_reset()
989 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size = 0; in FLAC__stream_decoder_reset()
997 FLAC__MD5Init(&decoder->private_->md5context); in FLAC__stream_decoder_reset()
999 decoder->private_->first_frame_offset = 0; in FLAC__stream_decoder_reset()
1000 decoder->private_->unparseable_frame_count = 0; in FLAC__stream_decoder_reset()
1149 if(0 == decoder->private_->seek_callback) in FLAC__stream_decoder_seek_absolute()
1152 FLAC__ASSERT(decoder->private_->seek_callback); in FLAC__stream_decoder_seek_absolute()
1153 FLAC__ASSERT(decoder->private_->tell_callback); in FLAC__stream_decoder_seek_absolute()
1154 FLAC__ASSERT(decoder->private_->length_callback); in FLAC__stream_decoder_seek_absolute()
1155 FLAC__ASSERT(decoder->private_->eof_callback); in FLAC__stream_decoder_seek_absolute()
1160 decoder->private_->is_seeking = true; in FLAC__stream_decoder_seek_absolute()
1163 decoder->private_->do_md5_checking = false; in FLAC__stream_decoder_seek_absolute()
1166 …if(decoder->private_->length_callback(decoder, &length, decoder->private_->client_data) != FLAC__S… in FLAC__stream_decoder_seek_absolute()
1167 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1178 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1183 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1191 decoder->private_->is_ogg? in FLAC__stream_decoder_seek_absolute()
1196 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1210 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in FLAC__stream_decoder_get_input_bytes_unconsumed()
1211 FLAC__ASSERT(!(FLAC__bitreader_get_input_bits_unconsumed(decoder->private_->input) & 7)); in FLAC__stream_decoder_get_input_bytes_unconsumed()
1212 return FLAC__bitreader_get_input_bits_unconsumed(decoder->private_->input) / 8; in FLAC__stream_decoder_get_input_bytes_unconsumed()
1223 decoder->private_->is_ogg = false; in set_defaults_()
1224 decoder->private_->read_callback = 0; in set_defaults_()
1225 decoder->private_->seek_callback = 0; in set_defaults_()
1226 decoder->private_->tell_callback = 0; in set_defaults_()
1227 decoder->private_->length_callback = 0; in set_defaults_()
1228 decoder->private_->eof_callback = 0; in set_defaults_()
1229 decoder->private_->write_callback = 0; in set_defaults_()
1230 decoder->private_->metadata_callback = 0; in set_defaults_()
1231 decoder->private_->error_callback = 0; in set_defaults_()
1232 decoder->private_->client_data = 0; in set_defaults_()
1234 memset(decoder->private_->metadata_filter, 0, sizeof(decoder->private_->metadata_filter)); in set_defaults_()
1235 decoder->private_->metadata_filter[FLAC__METADATA_TYPE_STREAMINFO] = true; in set_defaults_()
1236 decoder->private_->metadata_filter_ids_count = 0; in set_defaults_()
1271 if(size <= decoder->private_->output_capacity && channels <= decoder->private_->output_channels) in allocate_output_()
1277 if(0 != decoder->private_->output[i]) { in allocate_output_()
1278 free(decoder->private_->output[i]-4); in allocate_output_()
1279 decoder->private_->output[i] = 0; in allocate_output_()
1281 if(0 != decoder->private_->residual_unaligned[i]) { in allocate_output_()
1282 free(decoder->private_->residual_unaligned[i]); in allocate_output_()
1283 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in allocate_output_()
1300 decoder->private_->output[i] = tmp + 4; in allocate_output_()
1302 …__memory_alloc_aligned_int32_array(size, &decoder->private_->residual_unaligned[i], &decoder->priv… in allocate_output_()
1308 decoder->private_->output_capacity = size; in allocate_output_()
1309 decoder->private_->output_channels = channels; in allocate_output_()
1319 FLAC__ASSERT(0 != decoder->private_); in has_id_filtered_()
1321 for(i = 0; i < decoder->private_->metadata_filter_ids_count; i++) in has_id_filtered_()
1322 …if(0 == memcmp(decoder->private_->metadata_filter_ids + i * (FLAC__STREAM_METADATA_APPLICATION_ID_… in has_id_filtered_()
1334 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in find_metadata_()
1337 if(decoder->private_->cached) { in find_metadata_()
1338 x = (FLAC__uint32)decoder->private_->lookahead; in find_metadata_()
1339 decoder->private_->cached = false; in find_metadata_()
1342 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in find_metadata_()
1366 decoder->private_->header_warmup[0] = (FLAC__byte)x; in find_metadata_()
1367 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in find_metadata_()
1373 decoder->private_->lookahead = (FLAC__byte)x; in find_metadata_()
1374 decoder->private_->cached = true; in find_metadata_()
1377 decoder->private_->header_warmup[1] = (FLAC__byte)x; in find_metadata_()
1398 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_()
1400 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_IS_LAST_LE… in read_metadata_()
1404 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &type, FLAC__STREAM_METADATA_TYPE_LE… in read_metadata_()
1407 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &length, FLAC__STREAM_METADATA_LENGT… in read_metadata_()
1414 decoder->private_->has_stream_info = true; in read_metadata_()
1415 …if(0 == memcmp(decoder->private_->stream_info.data.stream_info.md5sum, "\0\0\0\0\0\0\0\0\0\0\0\0\0… in read_metadata_()
1416 decoder->private_->do_md5_checking = false; in read_metadata_()
1417 …if(!decoder->private_->is_seeking && decoder->private_->metadata_filter[FLAC__METADATA_TYPE_STREAM… in read_metadata_()
1418 …decoder->private_->metadata_callback(decoder, &decoder->private_->stream_info, decoder->private_->… in read_metadata_()
1422 decoder->private_->has_seek_table = false; in read_metadata_()
1427 decoder->private_->has_seek_table = true; in read_metadata_()
1428 …if(!decoder->private_->is_seeking && decoder->private_->metadata_filter[FLAC__METADATA_TYPE_SEEKTA… in read_metadata_()
1429 …decoder->private_->metadata_callback(decoder, &decoder->private_->seek_table, decoder->private_->c… in read_metadata_()
1432 FLAC__bool skip_it = !decoder->private_->metadata_filter[type]; in read_metadata_()
1442 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.applicatio… in read_metadata_()
1452 …if(decoder->private_->metadata_filter_ids_count > 0 && has_id_filtered_(decoder, block.data.applic… in read_metadata_()
1457 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, real_length)) in read_metadata_()
1465 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, real_length)) in read_metadata_()
1475 …else if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.appli… in read_metadata_()
1503 …else if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.unkno… in read_metadata_()
1510 if(ok && !decoder->private_->is_seeking && decoder->private_->metadata_callback) in read_metadata_()
1511 decoder->private_->metadata_callback(decoder, &block, decoder->private_->client_data); in read_metadata_()
1563 if(!FLAC__stream_decoder_get_decode_position(decoder, &decoder->private_->first_frame_offset)) in read_metadata_()
1564 decoder->private_->first_frame_offset = 0; in read_metadata_()
1576 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_streaminfo_()
1578 decoder->private_->stream_info.type = FLAC__METADATA_TYPE_STREAMINFO; in read_metadata_streaminfo_()
1579 decoder->private_->stream_info.is_last = is_last; in read_metadata_streaminfo_()
1580 decoder->private_->stream_info.length = length; in read_metadata_streaminfo_()
1583 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, bits)) in read_metadata_streaminfo_()
1585 decoder->private_->stream_info.data.stream_info.min_blocksize = x; in read_metadata_streaminfo_()
1589 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1591 decoder->private_->stream_info.data.stream_info.max_blocksize = x; in read_metadata_streaminfo_()
1595 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1597 decoder->private_->stream_info.data.stream_info.min_framesize = x; in read_metadata_streaminfo_()
1601 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1603 decoder->private_->stream_info.data.stream_info.max_framesize = x; in read_metadata_streaminfo_()
1607 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1609 decoder->private_->stream_info.data.stream_info.sample_rate = x; in read_metadata_streaminfo_()
1613 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1615 decoder->private_->stream_info.data.stream_info.channels = x+1; in read_metadata_streaminfo_()
1619 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1621 decoder->private_->stream_info.data.stream_info.bits_per_sample = x+1; in read_metadata_streaminfo_()
1625 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &decoder->private_->stream_info.data… in read_metadata_streaminfo_()
1629 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, decoder->private_->st… in read_metadata_streaminfo_()
1636 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_streaminfo_()
1647 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_seektable_()
1649 decoder->private_->seek_table.type = FLAC__METADATA_TYPE_SEEKTABLE; in read_metadata_seektable_()
1650 decoder->private_->seek_table.is_last = is_last; in read_metadata_seektable_()
1651 decoder->private_->seek_table.length = length; in read_metadata_seektable_()
1653 …decoder->private_->seek_table.data.seek_table.num_points = length / FLAC__STREAM_METADATA_SEEKPOIN… in read_metadata_seektable_()
1656 …coder->private_->seek_table.data.seek_table.points = safe_realloc_mul_2op_(decoder->private_->seek… in read_metadata_seektable_()
1660 for(i = 0; i < decoder->private_->seek_table.data.seek_table.num_points; i++) { in read_metadata_seektable_()
1661 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &xx, FLAC__STREAM_METADATA_SEEKPOINT… in read_metadata_seektable_()
1663 decoder->private_->seek_table.data.seek_table.points[i].sample_number = xx; in read_metadata_seektable_()
1665 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &xx, FLAC__STREAM_METADATA_SEEKPOINT… in read_metadata_seektable_()
1667 decoder->private_->seek_table.data.seek_table.points[i].stream_offset = xx; in read_metadata_seektable_()
1669 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_SEEKPOINT_… in read_metadata_seektable_()
1671 decoder->private_->seek_table.data.seek_table.points[i].frame_samples = x; in read_metadata_seektable_()
1673 …length -= (decoder->private_->seek_table.data.seek_table.num_points * FLAC__STREAM_METADATA_SEEKPO… in read_metadata_seektable_()
1677 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_seektable_()
1688 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_vorbiscomment_()
1694 …if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->vendor_string.lengt… in read_metadata_vorbiscomment_()
1708 …if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->vendor_string.e… in read_metadata_vorbiscomment_()
1717 if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->num_comments)) in read_metadata_vorbiscomment_()
1744 …if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->comments[i].length)… in read_metadata_vorbiscomment_()
1761 …if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].ent… in read_metadata_vorbiscomment_()
1780 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_vorbiscomment_()
1791 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_cuesheet_()
1796 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)obj->med… in read_metadata_cuesheet_()
1799 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &obj->lead_in, FLAC__STREAM_METADATA… in read_metadata_cuesheet_()
1802 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_I… in read_metadata_cuesheet_()
1806 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_RESE… in read_metadata_cuesheet_()
1809 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_N… in read_metadata_cuesheet_()
1820 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &track->offset, FLAC__STREAM_METADAT… in read_metadata_cuesheet_()
1823 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1828 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)track->i… in read_metadata_cuesheet_()
1831 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1835 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1839 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_TRAC… in read_metadata_cuesheet_()
1842 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1853 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &indx->offset, FLAC__STREAM_METADATA… in read_metadata_cuesheet_()
1856 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_I… in read_metadata_cuesheet_()
1860 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_INDE… in read_metadata_cuesheet_()
1874 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_picture_()
1877 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_TY… in read_metadata_picture_()
1882 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_MI… in read_metadata_picture_()
1889 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)obj->mim… in read_metadata_picture_()
1895 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_DE… in read_metadata_picture_()
1902 if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->description, x)) in read_metadata_picture_()
1908 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->width, FLAC__STREAM_METADATA_P… in read_metadata_picture_()
1912 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->height, FLAC__STREAM_METADATA_… in read_metadata_picture_()
1916 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->depth, FLAC__STREAM_METADATA_P… in read_metadata_picture_()
1920 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->colors, FLAC__STREAM_METADATA_… in read_metadata_picture_()
1924 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &(obj->data_length), FLAC__STREAM_ME… in read_metadata_picture_()
1931 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->data, obj->data_… in read_metadata_picture_()
1944 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 24)) in skip_id3v2_tag_()
1949 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in skip_id3v2_tag_()
1955 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, skip)) in skip_id3v2_tag_()
1968 if(decoder->private_->samples_decoded >= FLAC__stream_decoder_get_total_samples(decoder)) { in frame_sync_()
1975 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) { in frame_sync_()
1976 …bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__bitreader_bits_left_for_byte_alignme… in frame_sync_()
1981 if(decoder->private_->cached) { in frame_sync_()
1982 x = (FLAC__uint32)decoder->private_->lookahead; in frame_sync_()
1983 decoder->private_->cached = false; in frame_sync_()
1986 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in frame_sync_()
1990 decoder->private_->header_warmup[0] = (FLAC__byte)x; in frame_sync_()
1991 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in frame_sync_()
1997 decoder->private_->lookahead = (FLAC__byte)x; in frame_sync_()
1998 decoder->private_->cached = true; in frame_sync_()
2001 decoder->private_->header_warmup[1] = (FLAC__byte)x; in frame_sync_()
2027 frame_crc = FLAC__CRC16_UPDATE(decoder->private_->header_warmup[0], frame_crc); in read_frame_()
2028 frame_crc = FLAC__CRC16_UPDATE(decoder->private_->header_warmup[1], frame_crc); in read_frame_()
2029 FLAC__bitreader_reset_read_crc16(decoder->private_->input, (FLAC__uint16)frame_crc); in read_frame_()
2035 …if(!allocate_output_(decoder, decoder->private_->frame.header.blocksize, decoder->private_->frame.… in read_frame_()
2037 for(channel = 0; channel < decoder->private_->frame.header.channels; channel++) { in read_frame_()
2041 unsigned bps = decoder->private_->frame.header.bits_per_sample; in read_frame_()
2042 switch(decoder->private_->frame.header.channel_assignment) { in read_frame_()
2047 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2052 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2057 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2080 frame_crc = FLAC__bitreader_get_read_crc16(decoder->private_->input); in read_frame_()
2081 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__FRAME_FOOTER_CRC_LEN)) in read_frame_()
2086 switch(decoder->private_->frame.header.channel_assignment) { in read_frame_()
2091 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2092 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_frame_()
2093 …decoder->private_->output[1][i] = decoder->private_->output[0][i] - decoder->private_->output[1][i… in read_frame_()
2096 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2097 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_frame_()
2098 decoder->private_->output[0][i] += decoder->private_->output[1][i]; in read_frame_()
2101 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2102 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_frame_()
2104 mid = decoder->private_->output[0][i]; in read_frame_()
2105 side = decoder->private_->output[1][i]; in read_frame_()
2108 decoder->private_->output[0][i] = (mid + side) >> 1; in read_frame_()
2109 decoder->private_->output[1][i] = (mid - side) >> 1; in read_frame_()
2112 …mid = (decoder->private_->output[0][i] << 1) | (decoder->private_->output[1][i] & 1); /* i.e. if '… in read_frame_()
2113 decoder->private_->output[0][i] = (mid + decoder->private_->output[1][i]) >> 1; in read_frame_()
2114 decoder->private_->output[1][i] = (mid - decoder->private_->output[1][i]) >> 1; in read_frame_()
2128 for(channel = 0; channel < decoder->private_->frame.header.channels; channel++) { in read_frame_()
2129 …memset(decoder->private_->output[channel], 0, sizeof(FLAC__int32) * decoder->private_->frame.heade… in read_frame_()
2137 if(decoder->private_->next_fixed_block_size) in read_frame_()
2138 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size; in read_frame_()
2141 decoder->protected_->channels = decoder->private_->frame.header.channels; in read_frame_()
2142 decoder->protected_->channel_assignment = decoder->private_->frame.header.channel_assignment; in read_frame_()
2143 decoder->protected_->bits_per_sample = decoder->private_->frame.header.bits_per_sample; in read_frame_()
2144 decoder->protected_->sample_rate = decoder->private_->frame.header.sample_rate; in read_frame_()
2145 decoder->protected_->blocksize = decoder->private_->frame.header.blocksize; in read_frame_()
2147 FLAC__ASSERT(decoder->private_->frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER); in read_frame_()
2148 …decoder->private_->samples_decoded = decoder->private_->frame.header.number.sample_number + decode… in read_frame_()
2152 …te_audio_frame_to_client_(decoder, &decoder->private_->frame, (const FLAC__int32 * const *)decoder… in read_frame_()
2171 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_frame_header_()
2174 raw_header[0] = decoder->private_->header_warmup[0]; in read_frame_header_()
2175 raw_header[1] = decoder->private_->header_warmup[1]; in read_frame_header_()
2205 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2209 decoder->private_->lookahead = (FLAC__byte)x; in read_frame_header_()
2210 decoder->private_->cached = true; in read_frame_header_()
2223 decoder->private_->frame.header.blocksize = 192; in read_frame_header_()
2229 decoder->private_->frame.header.blocksize = 576 << (x-2); in read_frame_header_()
2243 decoder->private_->frame.header.blocksize = 256 << (x-8); in read_frame_header_()
2252 if(decoder->private_->has_stream_info) in read_frame_header_()
2253 …decoder->private_->frame.header.sample_rate = decoder->private_->stream_info.data.stream_info.samp… in read_frame_header_()
2258 decoder->private_->frame.header.sample_rate = 88200; in read_frame_header_()
2261 decoder->private_->frame.header.sample_rate = 176400; in read_frame_header_()
2264 decoder->private_->frame.header.sample_rate = 192000; in read_frame_header_()
2267 decoder->private_->frame.header.sample_rate = 8000; in read_frame_header_()
2270 decoder->private_->frame.header.sample_rate = 16000; in read_frame_header_()
2273 decoder->private_->frame.header.sample_rate = 22050; in read_frame_header_()
2276 decoder->private_->frame.header.sample_rate = 24000; in read_frame_header_()
2279 decoder->private_->frame.header.sample_rate = 32000; in read_frame_header_()
2282 decoder->private_->frame.header.sample_rate = 44100; in read_frame_header_()
2285 decoder->private_->frame.header.sample_rate = 48000; in read_frame_header_()
2288 decoder->private_->frame.header.sample_rate = 96000; in read_frame_header_()
2305 decoder->private_->frame.header.channels = 2; in read_frame_header_()
2308 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE; in read_frame_header_()
2311 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE; in read_frame_header_()
2314 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_MID_SIDE; in read_frame_header_()
2322 decoder->private_->frame.header.channels = (unsigned)x + 1; in read_frame_header_()
2323 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT; in read_frame_header_()
2328 if(decoder->private_->has_stream_info) in read_frame_header_()
2329 …decoder->private_->frame.header.bits_per_sample = decoder->private_->stream_info.data.stream_info.… in read_frame_header_()
2334 decoder->private_->frame.header.bits_per_sample = 8; in read_frame_header_()
2337 decoder->private_->frame.header.bits_per_sample = 12; in read_frame_header_()
2340 decoder->private_->frame.header.bits_per_sample = 16; in read_frame_header_()
2343 decoder->private_->frame.header.bits_per_sample = 20; in read_frame_header_()
2346 decoder->private_->frame.header.bits_per_sample = 24; in read_frame_header_()
2365 …(decoder->private_->has_stream_info && decoder->private_->stream_info.data.stream_info.min_blocksi… in read_frame_header_()
2367 if(!FLAC__bitreader_read_utf8_uint64(decoder->private_->input, &xx, raw_header, &raw_header_len)) in read_frame_header_()
2370 decoder->private_->lookahead = raw_header[raw_header_len-1]; /* back up as much as we can */ in read_frame_header_()
2371 decoder->private_->cached = true; in read_frame_header_()
2376 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER; in read_frame_header_()
2377 decoder->private_->frame.header.number.sample_number = xx; in read_frame_header_()
2380 if(!FLAC__bitreader_read_utf8_uint32(decoder->private_->input, &x, raw_header, &raw_header_len)) in read_frame_header_()
2383 decoder->private_->lookahead = raw_header[raw_header_len-1]; /* back up as much as we can */ in read_frame_header_()
2384 decoder->private_->cached = true; in read_frame_header_()
2389 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER; in read_frame_header_()
2390 decoder->private_->frame.header.number.frame_number = x; in read_frame_header_()
2394 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2399 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &_x, 8)) in read_frame_header_()
2404 decoder->private_->frame.header.blocksize = x+1; in read_frame_header_()
2408 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2413 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &_x, 8)) in read_frame_header_()
2419 decoder->private_->frame.header.sample_rate = x*1000; in read_frame_header_()
2421 decoder->private_->frame.header.sample_rate = x; in read_frame_header_()
2423 decoder->private_->frame.header.sample_rate = x*10; in read_frame_header_()
2427 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2438 decoder->private_->next_fixed_block_size = 0; in read_frame_header_()
2439 if(decoder->private_->frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER) { in read_frame_header_()
2440 x = decoder->private_->frame.header.number.frame_number; in read_frame_header_()
2441 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER; in read_frame_header_()
2442 if(decoder->private_->fixed_block_size) in read_frame_header_()
2443 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->fixed_bloc… in read_frame_header_()
2444 else if(decoder->private_->has_stream_info) { in read_frame_header_()
2445 …if(decoder->private_->stream_info.data.stream_info.min_blocksize == decoder->private_->stream_info… in read_frame_header_()
2446 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->stream_inf… in read_frame_header_()
2447 …decoder->private_->next_fixed_block_size = decoder->private_->stream_info.data.stream_info.max_blo… in read_frame_header_()
2453 decoder->private_->frame.header.number.sample_number = 0; in read_frame_header_()
2454 decoder->private_->next_fixed_block_size = decoder->private_->frame.header.blocksize; in read_frame_header_()
2458 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->frame.head… in read_frame_header_()
2477 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) /* MAGIC NUMBER */ in read_subframe_()
2485 if(!FLAC__bitreader_read_unary_unsigned(decoder->private_->input, &u)) in read_subframe_()
2487 decoder->private_->frame.subframes[channel].wasted_bits = u+1; in read_subframe_()
2488 if (decoder->private_->frame.subframes[channel].wasted_bits >= bps) in read_subframe_()
2490 bps -= decoder->private_->frame.subframes[channel].wasted_bits; in read_subframe_()
2493 decoder->private_->frame.subframes[channel].wasted_bits = 0; in read_subframe_()
2535 x = decoder->private_->frame.subframes[channel].wasted_bits; in read_subframe_()
2536 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_subframe_()
2537 uint32_t val = decoder->private_->output[channel][i]; in read_subframe_()
2538 decoder->private_->output[channel][i] = (val << x); in read_subframe_()
2547 FLAC__Subframe_Constant *subframe = &decoder->private_->frame.subframes[channel].data.constant; in read_subframe_constant_()
2550 FLAC__int32 *output = decoder->private_->output[channel]; in read_subframe_constant_()
2552 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_CONSTANT; in read_subframe_constant_()
2554 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &x, bps)) in read_subframe_constant_()
2561 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_subframe_constant_()
2570 FLAC__Subframe_Fixed *subframe = &decoder->private_->frame.subframes[channel].data.fixed; in read_subframe_fixed_()
2575 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_FIXED; in read_subframe_fixed_()
2577 subframe->residual = decoder->private_->residual[channel]; in read_subframe_fixed_()
2582 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, bps)) in read_subframe_fixed_()
2588 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_TY… in read_subframe_fixed_()
2594 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_PA… in read_subframe_fixed_()
2596 if(decoder->private_->frame.header.blocksize >> u32 < order) { in read_subframe_fixed_()
2602 …subframe->entropy_coding_method.data.partitioned_rice.contents = &decoder->private_->partitioned_r… in read_subframe_fixed_()
2614 …ethod.data.partitioned_rice.order, &decoder->private_->partitioned_rice_contents[channel], decoder… in read_subframe_fixed_()
2623 memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order); in read_subframe_fixed_()
2624 …_restore_signal(decoder->private_->residual[channel], decoder->private_->frame.header.blocksize-or… in read_subframe_fixed_()
2632 FLAC__Subframe_LPC *subframe = &decoder->private_->frame.subframes[channel].data.lpc; in read_subframe_lpc_()
2637 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_LPC; in read_subframe_lpc_()
2639 subframe->residual = decoder->private_->residual[channel]; in read_subframe_lpc_()
2644 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, bps)) in read_subframe_lpc_()
2650 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__SUBFRAME_LPC_QLP_COEFF_P… in read_subframe_lpc_()
2660 …if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, FLAC__SUBFRAME_LPC_QLP_SHIFT_LE… in read_subframe_lpc_()
2671 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, subframe->qlp_coeff_precision)) in read_subframe_lpc_()
2677 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_TY… in read_subframe_lpc_()
2683 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_PA… in read_subframe_lpc_()
2685 if(decoder->private_->frame.header.blocksize >> u32 < order) { in read_subframe_lpc_()
2691 …subframe->entropy_coding_method.data.partitioned_rice.contents = &decoder->private_->partitioned_r… in read_subframe_lpc_()
2703 …ethod.data.partitioned_rice.order, &decoder->private_->partitioned_rice_contents[channel], decoder… in read_subframe_lpc_()
2712 memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order); in read_subframe_lpc_()
2715private_->local_lpc_restore_signal_16bit(decoder->private_->residual[channel], decoder->private_->… in read_subframe_lpc_()
2717private_->local_lpc_restore_signal(decoder->private_->residual[channel], decoder->private_->frame.… in read_subframe_lpc_()
2719private_->local_lpc_restore_signal_64bit(decoder->private_->residual[channel], decoder->private_->… in read_subframe_lpc_()
2727 FLAC__Subframe_Verbatim *subframe = &decoder->private_->frame.subframes[channel].data.verbatim; in read_subframe_verbatim_()
2728 FLAC__int32 x, *residual = decoder->private_->residual[channel]; in read_subframe_verbatim_()
2731 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_VERBATIM; in read_subframe_verbatim_()
2735 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_subframe_verbatim_()
2736 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &x, bps)) in read_subframe_verbatim_()
2743 …memcpy(decoder->private_->output[channel], subframe->data, sizeof(FLAC__int32) * decoder->private_ in read_subframe_verbatim_()
2754 …_samples = partition_order > 0? decoder->private_->frame.header.blocksize >> partition_order : dec… in read_residual_partitioned_rice_()
2759 …FLAC__ASSERT(partition_order > 0? partition_samples >= predictor_order : decoder->private_->frame.… in read_residual_partitioned_rice_()
2768 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &rice_parameter, plen)) in read_residual_partitioned_rice_()
2774 …if(!FLAC__bitreader_read_rice_signed_block(decoder->private_->input, residual + sample, u, rice_pa… in read_residual_partitioned_rice_()
2779 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &rice_parameter, FLAC__ENTROPY_CODIN… in read_residual_partitioned_rice_()
2783 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i, rice_parameter)) in read_residual_partitioned_rice_()
2795 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) { in read_zero_padding_()
2797 …treader_read_raw_uint32(decoder->private_->input, &zero, FLAC__bitreader_bits_left_for_byte_alignm… in read_zero_padding_()
2814 !decoder->private_->is_ogg && in read_callback_()
2816 …decoder->private_->eof_callback && decoder->private_->eof_callback(decoder, decoder->private_->cli… in read_callback_()
2833 if(decoder->private_->is_seeking && decoder->private_->unparseable_frame_count > 20) { in read_callback_()
2840 decoder->private_->is_ogg? in read_callback_()
2843 decoder->private_->read_callback(decoder, buffer, bytes, decoder->private_->client_data) in read_callback_()
2855 !decoder->private_->is_ogg && in read_callback_()
2857 …decoder->private_->eof_callback && decoder->private_->eof_callback(decoder, decoder->private_->cli… in read_callback_()
2890 …gg_decoder_aspect, buffer, bytes, read_callback_proxy_, decoder, decoder->private_->client_data)) { in read_callback_ogg_aspect_()
2918 switch(decoder->private_->read_callback(decoder, buffer, bytes, client_data)) { in read_callback_proxy_()
2935 if(decoder->private_->is_seeking) { in write_audio_frame_to_client_()
2938 FLAC__uint64 target_sample = decoder->private_->target_sample; in write_audio_frame_to_client_()
2943 decoder->private_->got_a_frame = true; in write_audio_frame_to_client_()
2945 decoder->private_->last_frame = *frame; /* save the frame */ in write_audio_frame_to_client_()
2949 decoder->private_->is_seeking = false; in write_audio_frame_to_client_()
2956 decoder->private_->last_frame.header.blocksize -= delta; in write_audio_frame_to_client_()
2957 decoder->private_->last_frame.header.number.sample_number += (FLAC__uint64)delta; in write_audio_frame_to_client_()
2959 …return decoder->private_->write_callback(decoder, &decoder->private_->last_frame, newbuffer, decod… in write_audio_frame_to_client_()
2963 … return decoder->private_->write_callback(decoder, frame, buffer, decoder->private_->client_data); in write_audio_frame_to_client_()
2975 if(!decoder->private_->has_stream_info) in write_audio_frame_to_client_()
2976 decoder->private_->do_md5_checking = false; in write_audio_frame_to_client_()
2977 if(decoder->private_->do_md5_checking) { in write_audio_frame_to_client_()
2978 …if(!FLAC__MD5Accumulate(&decoder->private_->md5context, buffer, frame->header.channels, frame->hea… in write_audio_frame_to_client_()
2981 return decoder->private_->write_callback(decoder, frame, buffer, decoder->private_->client_data); in write_audio_frame_to_client_()
2987 if(!decoder->private_->is_seeking) in send_error_to_client_()
2988 decoder->private_->error_callback(decoder, status, decoder->private_->client_data); in send_error_to_client_()
2990 decoder->private_->unparseable_frame_count++; in send_error_to_client_()
2995 …FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound,… in seek_to_absolute_sample_()
3001 const unsigned min_blocksize = decoder->private_->stream_info.data.stream_info.min_blocksize; in seek_to_absolute_sample_()
3002 const unsigned max_blocksize = decoder->private_->stream_info.data.stream_info.max_blocksize; in seek_to_absolute_sample_()
3003 const unsigned max_framesize = decoder->private_->stream_info.data.stream_info.max_framesize; in seek_to_absolute_sample_()
3004 const unsigned min_framesize = decoder->private_->stream_info.data.stream_info.min_framesize; in seek_to_absolute_sample_()
3008 …FLAC__StreamMetadata_SeekTable *seek_table = decoder->private_->has_seek_table? &decoder->private_ in seek_to_absolute_sample_()
3012 channels = decoder->private_->stream_info.data.stream_info.channels; in seek_to_absolute_sample_()
3014 bps = decoder->private_->stream_info.data.stream_info.bits_per_sample; in seek_to_absolute_sample_()
3108 decoder->private_->target_sample = target_sample; in seek_to_absolute_sample_()
3128 …if(decoder->private_->seek_callback(decoder, (FLAC__uint64)pos, decoder->private_->client_data) !=… in seek_to_absolute_sample_()
3142 decoder->private_->unparseable_frame_count = 0; in seek_to_absolute_sample_()
3155 if(!decoder->private_->is_seeking) in seek_to_absolute_sample_()
3158 …FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NU… in seek_to_absolute_sample_()
3159 this_frame_sample = decoder->private_->last_frame.header.number.sample_number; in seek_to_absolute_sample_()
3161 …if (0 == decoder->private_->samples_decoded || (this_frame_sample + decoder->private_->last_frame.… in seek_to_absolute_sample_()
3182 upper_bound_sample = this_frame_sample + decoder->private_->last_frame.header.blocksize; in seek_to_absolute_sample_()
3191 lower_bound_sample = this_frame_sample + decoder->private_->last_frame.header.blocksize; in seek_to_absolute_sample_()
3233 decoder->private_->target_sample = target_sample; in seek_to_absolute_sample_ogg_()
3257 …if(decoder->private_->seek_callback((FLAC__StreamDecoder*)decoder, (FLAC__uint64)pos, decoder->pri… in seek_to_absolute_sample_ogg_()
3270 decoder->private_->got_a_frame = false; in seek_to_absolute_sample_ogg_()
3276 if(!decoder->private_->got_a_frame) { in seek_to_absolute_sample_ogg_()
3294 else if(!decoder->private_->is_seeking) { in seek_to_absolute_sample_ogg_()
3298 this_frame_sample = decoder->private_->last_frame.header.number.sample_number; in seek_to_absolute_sample_ogg_()
3299 …FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NU… in seek_to_absolute_sample_ogg_()
3341 *bytes = fread(buffer, sizeof(FLAC__byte), *bytes, decoder->private_->file); in file_read_callback_()
3342 if(ferror(decoder->private_->file)) in file_read_callback_()
3357 if(decoder->private_->file == stdin) in file_seek_callback_()
3359 else if(fseeko(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0) in file_seek_callback_()
3370 if(decoder->private_->file == stdin) in file_tell_callback_()
3372 else if((pos = ftello(decoder->private_->file)) < 0) in file_tell_callback_()
3385 if(decoder->private_->file == stdin) in file_length_callback_()
3387 else if(flac_fstat(fileno(decoder->private_->file), &filestats) != 0) in file_length_callback_()
3399 return feof(decoder->private_->file)? true : false; in file_eof_callback_()