Lines Matching refs:private_
269 decoder->private_ = calloc(1, sizeof(FLAC__StreamDecoderPrivate)); in FLAC__stream_decoder_new()
270 if(decoder->private_ == 0) { in FLAC__stream_decoder_new()
276 decoder->private_->input = FLAC__bitreader_new(); in FLAC__stream_decoder_new()
277 if(decoder->private_->input == 0) { in FLAC__stream_decoder_new()
278 free(decoder->private_); in FLAC__stream_decoder_new()
284 decoder->private_->metadata_filter_ids_capacity = 16; in FLAC__stream_decoder_new()
285 …if(0 == (decoder->private_->metadata_filter_ids = malloc((FLAC__STREAM_METADATA_APPLICATION_ID_LEN… in FLAC__stream_decoder_new()
286 FLAC__bitreader_delete(decoder->private_->input); in FLAC__stream_decoder_new()
287 free(decoder->private_); in FLAC__stream_decoder_new()
294 decoder->private_->output[i] = 0; in FLAC__stream_decoder_new()
295 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in FLAC__stream_decoder_new()
298 decoder->private_->output_capacity = 0; in FLAC__stream_decoder_new()
299 decoder->private_->output_channels = 0; in FLAC__stream_decoder_new()
300 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_new()
303 …FLAC__format_entropy_coding_method_partitioned_rice_contents_init(&decoder->private_->partitioned_… in FLAC__stream_decoder_new()
305 decoder->private_->file = 0; in FLAC__stream_decoder_new()
322 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_delete()
323 FLAC__ASSERT(0 != decoder->private_->input); in FLAC__stream_decoder_delete()
327 if(0 != decoder->private_->metadata_filter_ids) in FLAC__stream_decoder_delete()
328 free(decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_delete()
330 FLAC__bitreader_delete(decoder->private_->input); in FLAC__stream_decoder_delete()
333 …FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(&decoder->private_->partitioned… in FLAC__stream_decoder_delete()
335 free(decoder->private_); in FLAC__stream_decoder_delete()
379 decoder->private_->is_ogg = is_ogg; in init_stream_internal_()
387 FLAC__cpu_info(&decoder->private_->cpuinfo); in init_stream_internal_()
389 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal; in init_stream_internal_()
390 decoder->private_->local_lpc_restore_signal_64bit = FLAC__lpc_restore_signal_wide; in init_stream_internal_()
391 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal; in init_stream_internal_()
394 if(decoder->private_->cpuinfo.use_asm) { in init_stream_internal_()
396 FLAC__ASSERT(decoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_IA32); in init_stream_internal_()
398 …decoder->private_->local_lpc_restore_signal_64bit = FLAC__lpc_restore_signal_wide_asm_ia32; /* OPT… in init_stream_internal_()
399 if(decoder->private_->cpuinfo.ia32.mmx) { in init_stream_internal_()
400 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
401 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32_mmx; in init_stream_internal_()
404 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
405 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
410 if(decoder->private_->cpuinfo.ia32.sse2) { in init_stream_internal_()
411 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_16_intrin_sse2; in init_stream_internal_()
415 if(decoder->private_->cpuinfo.ia32.sse41) { in init_stream_internal_()
416 decoder->private_->local_lpc_restore_signal_64bit = FLAC__lpc_restore_signal_wide_intrin_sse41; in init_stream_internal_()
421 FLAC__ASSERT(decoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_X86_64); in init_stream_internal_()
429 if(!FLAC__bitreader_init(decoder->private_->input, read_callback_, decoder)) { in init_stream_internal_()
434 decoder->private_->read_callback = read_callback; in init_stream_internal_()
435 decoder->private_->seek_callback = seek_callback; in init_stream_internal_()
436 decoder->private_->tell_callback = tell_callback; in init_stream_internal_()
437 decoder->private_->length_callback = length_callback; in init_stream_internal_()
438 decoder->private_->eof_callback = eof_callback; in init_stream_internal_()
439 decoder->private_->write_callback = write_callback; in init_stream_internal_()
440 decoder->private_->metadata_callback = metadata_callback; in init_stream_internal_()
441 decoder->private_->error_callback = error_callback; in init_stream_internal_()
442 decoder->private_->client_data = client_data; in init_stream_internal_()
443 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size = 0; in init_stream_internal_()
444 decoder->private_->samples_decoded = 0; in init_stream_internal_()
445 decoder->private_->has_stream_info = false; in init_stream_internal_()
446 decoder->private_->cached = false; in init_stream_internal_()
448 decoder->private_->do_md5_checking = decoder->protected_->md5_checking; in init_stream_internal_()
449 decoder->private_->is_seeking = false; in init_stream_internal_()
451 …decoder->private_->internal_reset_hack = true; /* so the following reset does not try to rewind th… in init_stream_internal_()
543 decoder->private_->file = file; in init_FILE_internal_()
548 decoder->private_->file == stdin? 0: file_seek_callback_, in init_FILE_internal_()
549 decoder->private_->file == stdin? 0: file_tell_callback_, in init_FILE_internal_()
550 decoder->private_->file == stdin? 0: file_length_callback_, in init_FILE_internal_()
647 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_finish()
656 FLAC__MD5Final(decoder->private_->computed_md5sum, &decoder->private_->md5context); in FLAC__stream_decoder_finish()
658 …if(decoder->private_->has_seek_table && 0 != decoder->private_->seek_table.data.seek_table.points)… in FLAC__stream_decoder_finish()
659 free(decoder->private_->seek_table.data.seek_table.points); in FLAC__stream_decoder_finish()
660 decoder->private_->seek_table.data.seek_table.points = 0; in FLAC__stream_decoder_finish()
661 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_finish()
663 FLAC__bitreader_free(decoder->private_->input); in FLAC__stream_decoder_finish()
671 if(0 != decoder->private_->output[i]) { in FLAC__stream_decoder_finish()
672 free(decoder->private_->output[i]-4); in FLAC__stream_decoder_finish()
673 decoder->private_->output[i] = 0; in FLAC__stream_decoder_finish()
675 if(0 != decoder->private_->residual_unaligned[i]) { in FLAC__stream_decoder_finish()
676 free(decoder->private_->residual_unaligned[i]); in FLAC__stream_decoder_finish()
677 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in FLAC__stream_decoder_finish()
680 decoder->private_->output_capacity = 0; in FLAC__stream_decoder_finish()
681 decoder->private_->output_channels = 0; in FLAC__stream_decoder_finish()
684 if(decoder->private_->is_ogg) in FLAC__stream_decoder_finish()
688 if(0 != decoder->private_->file) { in FLAC__stream_decoder_finish()
689 if(decoder->private_->file != stdin) in FLAC__stream_decoder_finish()
690 fclose(decoder->private_->file); in FLAC__stream_decoder_finish()
691 decoder->private_->file = 0; in FLAC__stream_decoder_finish()
694 if(decoder->private_->do_md5_checking) { in FLAC__stream_decoder_finish()
695 …if(memcmp(decoder->private_->stream_info.data.stream_info.md5sum, decoder->private_->computed_md5s… in FLAC__stream_decoder_finish()
698 decoder->private_->is_seeking = false; in FLAC__stream_decoder_finish()
710 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_ogg_serial_number()
737 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond()
745 decoder->private_->metadata_filter[type] = true; in FLAC__stream_decoder_set_metadata_respond()
747 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_respond()
754 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond_application()
760 if(decoder->private_->metadata_filter[FLAC__METADATA_TYPE_APPLICATION]) in FLAC__stream_decoder_set_metadata_respond_application()
763 FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_set_metadata_respond_application()
765 …if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity… in FLAC__stream_decoder_set_metadata_respond_application()
766 …if(0 == (decoder->private_->metadata_filter_ids = safe_realloc_mul_2op_(decoder->private_->metadat… in FLAC__stream_decoder_set_metadata_respond_application()
770 decoder->private_->metadata_filter_ids_capacity *= 2; in FLAC__stream_decoder_set_metadata_respond_application()
773 …memcpy(decoder->private_->metadata_filter_ids + decoder->private_->metadata_filter_ids_count * (FL… in FLAC__stream_decoder_set_metadata_respond_application()
774 decoder->private_->metadata_filter_ids_count++; in FLAC__stream_decoder_set_metadata_respond_application()
783 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond_all()
787 …for(i = 0; i < sizeof(decoder->private_->metadata_filter) / sizeof(decoder->private_->metadata_fil… in FLAC__stream_decoder_set_metadata_respond_all()
788 decoder->private_->metadata_filter[i] = true; in FLAC__stream_decoder_set_metadata_respond_all()
789 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_respond_all()
796 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore()
804 decoder->private_->metadata_filter[type] = false; in FLAC__stream_decoder_set_metadata_ignore()
806 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_ignore()
813 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore_application()
819 if(!decoder->private_->metadata_filter[FLAC__METADATA_TYPE_APPLICATION]) in FLAC__stream_decoder_set_metadata_ignore_application()
822 FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_set_metadata_ignore_application()
824 …if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity… in FLAC__stream_decoder_set_metadata_ignore_application()
825 …if(0 == (decoder->private_->metadata_filter_ids = safe_realloc_mul_2op_(decoder->private_->metadat… in FLAC__stream_decoder_set_metadata_ignore_application()
829 decoder->private_->metadata_filter_ids_capacity *= 2; in FLAC__stream_decoder_set_metadata_ignore_application()
832 …memcpy(decoder->private_->metadata_filter_ids + decoder->private_->metadata_filter_ids_count * (FL… in FLAC__stream_decoder_set_metadata_ignore_application()
833 decoder->private_->metadata_filter_ids_count++; in FLAC__stream_decoder_set_metadata_ignore_application()
841 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore_all()
845 memset(decoder->private_->metadata_filter, 0, sizeof(decoder->private_->metadata_filter)); in FLAC__stream_decoder_set_metadata_ignore_all()
846 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_ignore_all()
873 …return decoder->private_->has_stream_info? decoder->private_->stream_info.data.stream_info.total_s… in FLAC__stream_decoder_get_total_samples()
914 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_get_decode_position()
918 if(decoder->private_->is_ogg) in FLAC__stream_decoder_get_decode_position()
921 if(0 == decoder->private_->tell_callback) in FLAC__stream_decoder_get_decode_position()
923 …if(decoder->private_->tell_callback(decoder, position, decoder->private_->client_data) != FLAC__ST… in FLAC__stream_decoder_get_decode_position()
926 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) in FLAC__stream_decoder_get_decode_position()
936 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_flush()
939 …if(!decoder->private_->internal_reset_hack && decoder->protected_->state == FLAC__STREAM_DECODER_U… in FLAC__stream_decoder_flush()
942 decoder->private_->samples_decoded = 0; in FLAC__stream_decoder_flush()
943 decoder->private_->do_md5_checking = false; in FLAC__stream_decoder_flush()
946 if(decoder->private_->is_ogg) in FLAC__stream_decoder_flush()
950 if(!FLAC__bitreader_clear(decoder->private_->input)) { in FLAC__stream_decoder_flush()
962 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_reset()
972 if(decoder->private_->is_ogg) in FLAC__stream_decoder_reset()
981 if(!decoder->private_->internal_reset_hack) { in FLAC__stream_decoder_reset()
982 if(decoder->private_->file == stdin) in FLAC__stream_decoder_reset()
984 …if(decoder->private_->seek_callback && decoder->private_->seek_callback(decoder, 0, decoder->priva… in FLAC__stream_decoder_reset()
988 decoder->private_->internal_reset_hack = false; in FLAC__stream_decoder_reset()
992 decoder->private_->has_stream_info = false; in FLAC__stream_decoder_reset()
993 …if(decoder->private_->has_seek_table && 0 != decoder->private_->seek_table.data.seek_table.points)… in FLAC__stream_decoder_reset()
994 free(decoder->private_->seek_table.data.seek_table.points); in FLAC__stream_decoder_reset()
995 decoder->private_->seek_table.data.seek_table.points = 0; in FLAC__stream_decoder_reset()
996 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_reset()
998 decoder->private_->do_md5_checking = decoder->protected_->md5_checking; in FLAC__stream_decoder_reset()
1003 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size = 0; in FLAC__stream_decoder_reset()
1011 FLAC__MD5Init(&decoder->private_->md5context); in FLAC__stream_decoder_reset()
1013 decoder->private_->first_frame_offset = 0; in FLAC__stream_decoder_reset()
1014 decoder->private_->unparseable_frame_count = 0; in FLAC__stream_decoder_reset()
1163 if(0 == decoder->private_->seek_callback) in FLAC__stream_decoder_seek_absolute()
1166 FLAC__ASSERT(decoder->private_->seek_callback); in FLAC__stream_decoder_seek_absolute()
1167 FLAC__ASSERT(decoder->private_->tell_callback); in FLAC__stream_decoder_seek_absolute()
1168 FLAC__ASSERT(decoder->private_->length_callback); in FLAC__stream_decoder_seek_absolute()
1169 FLAC__ASSERT(decoder->private_->eof_callback); in FLAC__stream_decoder_seek_absolute()
1174 decoder->private_->is_seeking = true; in FLAC__stream_decoder_seek_absolute()
1177 decoder->private_->do_md5_checking = false; in FLAC__stream_decoder_seek_absolute()
1180 …if(decoder->private_->length_callback(decoder, &length, decoder->private_->client_data) != FLAC__S… in FLAC__stream_decoder_seek_absolute()
1181 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1192 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1197 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1205 decoder->private_->is_ogg? in FLAC__stream_decoder_seek_absolute()
1210 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1224 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in FLAC__stream_decoder_get_input_bytes_unconsumed()
1225 FLAC__ASSERT(!(FLAC__bitreader_get_input_bits_unconsumed(decoder->private_->input) & 7)); in FLAC__stream_decoder_get_input_bytes_unconsumed()
1226 return FLAC__bitreader_get_input_bits_unconsumed(decoder->private_->input) / 8; in FLAC__stream_decoder_get_input_bytes_unconsumed()
1238 decoder->private_->is_ogg = false; in set_defaults_()
1240 decoder->private_->read_callback = 0; in set_defaults_()
1241 decoder->private_->seek_callback = 0; in set_defaults_()
1242 decoder->private_->tell_callback = 0; in set_defaults_()
1243 decoder->private_->length_callback = 0; in set_defaults_()
1244 decoder->private_->eof_callback = 0; in set_defaults_()
1245 decoder->private_->write_callback = 0; in set_defaults_()
1246 decoder->private_->metadata_callback = 0; in set_defaults_()
1247 decoder->private_->error_callback = 0; in set_defaults_()
1248 decoder->private_->client_data = 0; in set_defaults_()
1250 memset(decoder->private_->metadata_filter, 0, sizeof(decoder->private_->metadata_filter)); in set_defaults_()
1251 decoder->private_->metadata_filter[FLAC__METADATA_TYPE_STREAMINFO] = true; in set_defaults_()
1252 decoder->private_->metadata_filter_ids_count = 0; in set_defaults_()
1287 if(size <= decoder->private_->output_capacity && channels <= decoder->private_->output_channels) in allocate_output_()
1293 if(0 != decoder->private_->output[i]) { in allocate_output_()
1294 free(decoder->private_->output[i]-4); in allocate_output_()
1295 decoder->private_->output[i] = 0; in allocate_output_()
1297 if(0 != decoder->private_->residual_unaligned[i]) { in allocate_output_()
1298 free(decoder->private_->residual_unaligned[i]); in allocate_output_()
1299 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in allocate_output_()
1316 decoder->private_->output[i] = tmp + 4; in allocate_output_()
1318 …__memory_alloc_aligned_int32_array(size, &decoder->private_->residual_unaligned[i], &decoder->priv… in allocate_output_()
1324 decoder->private_->output_capacity = size; in allocate_output_()
1325 decoder->private_->output_channels = channels; in allocate_output_()
1335 FLAC__ASSERT(0 != decoder->private_); in has_id_filtered_()
1337 for(i = 0; i < decoder->private_->metadata_filter_ids_count; i++) in has_id_filtered_()
1338 …if(0 == memcmp(decoder->private_->metadata_filter_ids + i * (FLAC__STREAM_METADATA_APPLICATION_ID_… in has_id_filtered_()
1350 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in find_metadata_()
1353 if(decoder->private_->cached) { in find_metadata_()
1354 x = (FLAC__uint32)decoder->private_->lookahead; in find_metadata_()
1355 decoder->private_->cached = false; in find_metadata_()
1358 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in find_metadata_()
1382 decoder->private_->header_warmup[0] = (FLAC__byte)x; in find_metadata_()
1383 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in find_metadata_()
1389 decoder->private_->lookahead = (FLAC__byte)x; in find_metadata_()
1390 decoder->private_->cached = true; in find_metadata_()
1393 decoder->private_->header_warmup[1] = (FLAC__byte)x; in find_metadata_()
1414 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_()
1416 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_IS_LAST_LE… in read_metadata_()
1420 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &type, FLAC__STREAM_METADATA_TYPE_LE… in read_metadata_()
1423 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &length, FLAC__STREAM_METADATA_LENGT… in read_metadata_()
1430 decoder->private_->has_stream_info = true; in read_metadata_()
1431 …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_()
1432 decoder->private_->do_md5_checking = false; in read_metadata_()
1433 …if(!decoder->private_->is_seeking && decoder->private_->metadata_filter[FLAC__METADATA_TYPE_STREAM… in read_metadata_()
1434 …decoder->private_->metadata_callback(decoder, &decoder->private_->stream_info, decoder->private_->… in read_metadata_()
1440 decoder->private_->has_seek_table = true; in read_metadata_()
1441 …if(!decoder->private_->is_seeking && decoder->private_->metadata_filter[FLAC__METADATA_TYPE_SEEKTA… in read_metadata_()
1442 …decoder->private_->metadata_callback(decoder, &decoder->private_->seek_table, decoder->private_->c… in read_metadata_()
1445 FLAC__bool skip_it = !decoder->private_->metadata_filter[type]; in read_metadata_()
1455 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.applicatio… in read_metadata_()
1465 …if(decoder->private_->metadata_filter_ids_count > 0 && has_id_filtered_(decoder, block.data.applic… in read_metadata_()
1470 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, real_length)) in read_metadata_()
1478 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, real_length)) in read_metadata_()
1488 …else if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.appli… in read_metadata_()
1516 …else if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.unkno… in read_metadata_()
1523 if(ok && !decoder->private_->is_seeking && decoder->private_->metadata_callback) in read_metadata_()
1524 decoder->private_->metadata_callback(decoder, &block, decoder->private_->client_data); in read_metadata_()
1576 if(!FLAC__stream_decoder_get_decode_position(decoder, &decoder->private_->first_frame_offset)) in read_metadata_()
1577 decoder->private_->first_frame_offset = 0; in read_metadata_()
1589 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_streaminfo_()
1591 decoder->private_->stream_info.type = FLAC__METADATA_TYPE_STREAMINFO; in read_metadata_streaminfo_()
1592 decoder->private_->stream_info.is_last = is_last; in read_metadata_streaminfo_()
1593 decoder->private_->stream_info.length = length; in read_metadata_streaminfo_()
1596 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, bits)) in read_metadata_streaminfo_()
1598 decoder->private_->stream_info.data.stream_info.min_blocksize = x; in read_metadata_streaminfo_()
1602 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1604 decoder->private_->stream_info.data.stream_info.max_blocksize = x; in read_metadata_streaminfo_()
1608 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1610 decoder->private_->stream_info.data.stream_info.min_framesize = x; in read_metadata_streaminfo_()
1614 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1616 decoder->private_->stream_info.data.stream_info.max_framesize = x; in read_metadata_streaminfo_()
1620 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1622 decoder->private_->stream_info.data.stream_info.sample_rate = x; in read_metadata_streaminfo_()
1626 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1628 decoder->private_->stream_info.data.stream_info.channels = x+1; in read_metadata_streaminfo_()
1632 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1634 decoder->private_->stream_info.data.stream_info.bits_per_sample = x+1; in read_metadata_streaminfo_()
1638 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &decoder->private_->stream_info.data… in read_metadata_streaminfo_()
1642 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, decoder->private_->st… in read_metadata_streaminfo_()
1649 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_streaminfo_()
1660 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_seektable_()
1662 decoder->private_->seek_table.type = FLAC__METADATA_TYPE_SEEKTABLE; in read_metadata_seektable_()
1663 decoder->private_->seek_table.is_last = is_last; in read_metadata_seektable_()
1664 decoder->private_->seek_table.length = length; in read_metadata_seektable_()
1666 …decoder->private_->seek_table.data.seek_table.num_points = length / FLAC__STREAM_METADATA_SEEKPOIN… in read_metadata_seektable_()
1669 …coder->private_->seek_table.data.seek_table.points = safe_realloc_mul_2op_(decoder->private_->seek… in read_metadata_seektable_()
1673 for(i = 0; i < decoder->private_->seek_table.data.seek_table.num_points; i++) { in read_metadata_seektable_()
1674 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &xx, FLAC__STREAM_METADATA_SEEKPOINT… in read_metadata_seektable_()
1676 decoder->private_->seek_table.data.seek_table.points[i].sample_number = xx; in read_metadata_seektable_()
1678 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &xx, FLAC__STREAM_METADATA_SEEKPOINT… in read_metadata_seektable_()
1680 decoder->private_->seek_table.data.seek_table.points[i].stream_offset = xx; in read_metadata_seektable_()
1682 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_SEEKPOINT_… in read_metadata_seektable_()
1684 decoder->private_->seek_table.data.seek_table.points[i].frame_samples = x; in read_metadata_seektable_()
1686 …length -= (decoder->private_->seek_table.data.seek_table.num_points * FLAC__STREAM_METADATA_SEEKPO… in read_metadata_seektable_()
1690 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_seektable_()
1701 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_vorbiscomment_()
1707 …if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->vendor_string.lengt… in read_metadata_vorbiscomment_()
1721 …if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->vendor_string.e… in read_metadata_vorbiscomment_()
1730 if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->num_comments)) in read_metadata_vorbiscomment_()
1758 …if (!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->comments[i].length)… in read_metadata_vorbiscomment_()
1774 …if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].ent… in read_metadata_vorbiscomment_()
1793 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_vorbiscomment_()
1804 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_cuesheet_()
1809 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)obj->med… in read_metadata_cuesheet_()
1812 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &obj->lead_in, FLAC__STREAM_METADATA… in read_metadata_cuesheet_()
1815 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_I… in read_metadata_cuesheet_()
1819 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_RESE… in read_metadata_cuesheet_()
1822 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_N… in read_metadata_cuesheet_()
1833 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &track->offset, FLAC__STREAM_METADAT… in read_metadata_cuesheet_()
1836 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1841 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)track->i… in read_metadata_cuesheet_()
1844 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1848 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1852 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_TRAC… in read_metadata_cuesheet_()
1855 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1866 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &indx->offset, FLAC__STREAM_METADATA… in read_metadata_cuesheet_()
1869 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_I… in read_metadata_cuesheet_()
1873 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_INDE… in read_metadata_cuesheet_()
1887 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_picture_()
1890 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_TY… in read_metadata_picture_()
1895 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_MI… in read_metadata_picture_()
1902 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)obj->mim… in read_metadata_picture_()
1908 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_DE… in read_metadata_picture_()
1915 if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->description, x)) in read_metadata_picture_()
1921 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->width, FLAC__STREAM_METADATA_P… in read_metadata_picture_()
1925 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->height, FLAC__STREAM_METADATA_… in read_metadata_picture_()
1929 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->depth, FLAC__STREAM_METADATA_P… in read_metadata_picture_()
1933 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->colors, FLAC__STREAM_METADATA_… in read_metadata_picture_()
1937 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &(obj->data_length), FLAC__STREAM_ME… in read_metadata_picture_()
1944 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->data, obj->data_… in read_metadata_picture_()
1957 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 24)) in skip_id3v2_tag_()
1962 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in skip_id3v2_tag_()
1968 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, skip)) in skip_id3v2_tag_()
1981 if(decoder->private_->samples_decoded >= FLAC__stream_decoder_get_total_samples(decoder)) { in frame_sync_()
1988 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) { in frame_sync_()
1989 …bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__bitreader_bits_left_for_byte_alignme… in frame_sync_()
1994 if(decoder->private_->cached) { in frame_sync_()
1995 x = (FLAC__uint32)decoder->private_->lookahead; in frame_sync_()
1996 decoder->private_->cached = false; in frame_sync_()
1999 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in frame_sync_()
2003 decoder->private_->header_warmup[0] = (FLAC__byte)x; in frame_sync_()
2004 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in frame_sync_()
2010 decoder->private_->lookahead = (FLAC__byte)x; in frame_sync_()
2011 decoder->private_->cached = true; in frame_sync_()
2014 decoder->private_->header_warmup[1] = (FLAC__byte)x; in frame_sync_()
2040 frame_crc = FLAC__CRC16_UPDATE(decoder->private_->header_warmup[0], frame_crc); in read_frame_()
2041 frame_crc = FLAC__CRC16_UPDATE(decoder->private_->header_warmup[1], frame_crc); in read_frame_()
2042 FLAC__bitreader_reset_read_crc16(decoder->private_->input, (FLAC__uint16)frame_crc); in read_frame_()
2048 …if(!allocate_output_(decoder, decoder->private_->frame.header.blocksize, decoder->private_->frame.… in read_frame_()
2050 for(channel = 0; channel < decoder->private_->frame.header.channels; channel++) { in read_frame_()
2054 unsigned bps = decoder->private_->frame.header.bits_per_sample; in read_frame_()
2055 switch(decoder->private_->frame.header.channel_assignment) { in read_frame_()
2060 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2065 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2070 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2093 frame_crc = FLAC__bitreader_get_read_crc16(decoder->private_->input); in read_frame_()
2094 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__FRAME_FOOTER_CRC_LEN)) in read_frame_()
2099 switch(decoder->private_->frame.header.channel_assignment) { in read_frame_()
2104 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2105 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_frame_()
2106 …decoder->private_->output[1][i] = decoder->private_->output[0][i] - decoder->private_->output[1][i… in read_frame_()
2109 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2110 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_frame_()
2111 decoder->private_->output[0][i] += decoder->private_->output[1][i]; in read_frame_()
2114 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2115 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_frame_()
2117 mid = decoder->private_->output[0][i]; in read_frame_()
2118 side = decoder->private_->output[1][i]; in read_frame_()
2121 decoder->private_->output[0][i] = (mid + side) >> 1; in read_frame_()
2122 decoder->private_->output[1][i] = (mid - side) >> 1; in read_frame_()
2125 …mid = (decoder->private_->output[0][i] << 1) | (decoder->private_->output[1][i] & 1); /* i.e. if '… in read_frame_()
2126 decoder->private_->output[0][i] = (mid + decoder->private_->output[1][i]) >> 1; in read_frame_()
2127 decoder->private_->output[1][i] = (mid - decoder->private_->output[1][i]) >> 1; in read_frame_()
2141 for(channel = 0; channel < decoder->private_->frame.header.channels; channel++) { in read_frame_()
2142 …memset(decoder->private_->output[channel], 0, sizeof(FLAC__int32) * decoder->private_->frame.heade… in read_frame_()
2150 if(decoder->private_->next_fixed_block_size) in read_frame_()
2151 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size; in read_frame_()
2154 decoder->protected_->channels = decoder->private_->frame.header.channels; in read_frame_()
2155 decoder->protected_->channel_assignment = decoder->private_->frame.header.channel_assignment; in read_frame_()
2156 decoder->protected_->bits_per_sample = decoder->private_->frame.header.bits_per_sample; in read_frame_()
2157 decoder->protected_->sample_rate = decoder->private_->frame.header.sample_rate; in read_frame_()
2158 decoder->protected_->blocksize = decoder->private_->frame.header.blocksize; in read_frame_()
2160 FLAC__ASSERT(decoder->private_->frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER); in read_frame_()
2161 …decoder->private_->samples_decoded = decoder->private_->frame.header.number.sample_number + decode… in read_frame_()
2165 …te_audio_frame_to_client_(decoder, &decoder->private_->frame, (const FLAC__int32 * const *)decoder… in read_frame_()
2182 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_frame_header_()
2185 raw_header[0] = decoder->private_->header_warmup[0]; in read_frame_header_()
2186 raw_header[1] = decoder->private_->header_warmup[1]; in read_frame_header_()
2216 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2220 decoder->private_->lookahead = (FLAC__byte)x; in read_frame_header_()
2221 decoder->private_->cached = true; in read_frame_header_()
2234 decoder->private_->frame.header.blocksize = 192; in read_frame_header_()
2240 decoder->private_->frame.header.blocksize = 576 << (x-2); in read_frame_header_()
2254 decoder->private_->frame.header.blocksize = 256 << (x-8); in read_frame_header_()
2263 if(decoder->private_->has_stream_info) in read_frame_header_()
2264 …decoder->private_->frame.header.sample_rate = decoder->private_->stream_info.data.stream_info.samp… in read_frame_header_()
2269 decoder->private_->frame.header.sample_rate = 88200; in read_frame_header_()
2272 decoder->private_->frame.header.sample_rate = 176400; in read_frame_header_()
2275 decoder->private_->frame.header.sample_rate = 192000; in read_frame_header_()
2278 decoder->private_->frame.header.sample_rate = 8000; in read_frame_header_()
2281 decoder->private_->frame.header.sample_rate = 16000; in read_frame_header_()
2284 decoder->private_->frame.header.sample_rate = 22050; in read_frame_header_()
2287 decoder->private_->frame.header.sample_rate = 24000; in read_frame_header_()
2290 decoder->private_->frame.header.sample_rate = 32000; in read_frame_header_()
2293 decoder->private_->frame.header.sample_rate = 44100; in read_frame_header_()
2296 decoder->private_->frame.header.sample_rate = 48000; in read_frame_header_()
2299 decoder->private_->frame.header.sample_rate = 96000; in read_frame_header_()
2316 decoder->private_->frame.header.channels = 2; in read_frame_header_()
2319 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE; in read_frame_header_()
2322 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE; in read_frame_header_()
2325 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_MID_SIDE; in read_frame_header_()
2333 decoder->private_->frame.header.channels = (unsigned)x + 1; in read_frame_header_()
2334 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT; in read_frame_header_()
2339 if(decoder->private_->has_stream_info) in read_frame_header_()
2340 …decoder->private_->frame.header.bits_per_sample = decoder->private_->stream_info.data.stream_info.… in read_frame_header_()
2345 decoder->private_->frame.header.bits_per_sample = 8; in read_frame_header_()
2348 decoder->private_->frame.header.bits_per_sample = 12; in read_frame_header_()
2351 decoder->private_->frame.header.bits_per_sample = 16; in read_frame_header_()
2354 decoder->private_->frame.header.bits_per_sample = 20; in read_frame_header_()
2357 decoder->private_->frame.header.bits_per_sample = 24; in read_frame_header_()
2376 …(decoder->private_->has_stream_info && decoder->private_->stream_info.data.stream_info.min_blocksi… in read_frame_header_()
2378 if(!FLAC__bitreader_read_utf8_uint64(decoder->private_->input, &xx, raw_header, &raw_header_len)) in read_frame_header_()
2381 decoder->private_->lookahead = raw_header[raw_header_len-1]; /* back up as much as we can */ in read_frame_header_()
2382 decoder->private_->cached = true; in read_frame_header_()
2387 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER; in read_frame_header_()
2388 decoder->private_->frame.header.number.sample_number = xx; in read_frame_header_()
2391 if(!FLAC__bitreader_read_utf8_uint32(decoder->private_->input, &x, raw_header, &raw_header_len)) in read_frame_header_()
2394 decoder->private_->lookahead = raw_header[raw_header_len-1]; /* back up as much as we can */ in read_frame_header_()
2395 decoder->private_->cached = true; in read_frame_header_()
2400 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER; in read_frame_header_()
2401 decoder->private_->frame.header.number.frame_number = x; in read_frame_header_()
2405 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2410 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &_x, 8)) in read_frame_header_()
2415 decoder->private_->frame.header.blocksize = x+1; in read_frame_header_()
2419 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2424 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &_x, 8)) in read_frame_header_()
2430 decoder->private_->frame.header.sample_rate = x*1000; in read_frame_header_()
2432 decoder->private_->frame.header.sample_rate = x; in read_frame_header_()
2434 decoder->private_->frame.header.sample_rate = x*10; in read_frame_header_()
2438 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2449 decoder->private_->next_fixed_block_size = 0; in read_frame_header_()
2450 if(decoder->private_->frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER) { in read_frame_header_()
2451 x = decoder->private_->frame.header.number.frame_number; in read_frame_header_()
2452 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER; in read_frame_header_()
2453 if(decoder->private_->fixed_block_size) in read_frame_header_()
2454 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->fixed_bloc… in read_frame_header_()
2455 else if(decoder->private_->has_stream_info) { in read_frame_header_()
2456 …if(decoder->private_->stream_info.data.stream_info.min_blocksize == decoder->private_->stream_info… in read_frame_header_()
2457 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->stream_inf… in read_frame_header_()
2458 …decoder->private_->next_fixed_block_size = decoder->private_->stream_info.data.stream_info.max_blo… in read_frame_header_()
2464 decoder->private_->frame.header.number.sample_number = 0; in read_frame_header_()
2465 decoder->private_->next_fixed_block_size = decoder->private_->frame.header.blocksize; in read_frame_header_()
2469 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->frame.head… in read_frame_header_()
2488 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) /* MAGIC NUMBER */ in read_subframe_()
2496 if(!FLAC__bitreader_read_unary_unsigned(decoder->private_->input, &u)) in read_subframe_()
2498 decoder->private_->frame.subframes[channel].wasted_bits = u+1; in read_subframe_()
2499 bps -= decoder->private_->frame.subframes[channel].wasted_bits; in read_subframe_()
2502 decoder->private_->frame.subframes[channel].wasted_bits = 0; in read_subframe_()
2544 x = decoder->private_->frame.subframes[channel].wasted_bits; in read_subframe_()
2545 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_subframe_()
2546 uint32_t val = decoder->private_->output[channel][i]; in read_subframe_()
2547 decoder->private_->output[channel][i] = (val << x); in read_subframe_()
2556 FLAC__Subframe_Constant *subframe = &decoder->private_->frame.subframes[channel].data.constant; in read_subframe_constant_()
2559 FLAC__int32 *output = decoder->private_->output[channel]; in read_subframe_constant_()
2561 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_CONSTANT; in read_subframe_constant_()
2563 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &x, bps)) in read_subframe_constant_()
2570 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_subframe_constant_()
2579 FLAC__Subframe_Fixed *subframe = &decoder->private_->frame.subframes[channel].data.fixed; in read_subframe_fixed_()
2584 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_FIXED; in read_subframe_fixed_()
2586 subframe->residual = decoder->private_->residual[channel]; in read_subframe_fixed_()
2591 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, bps)) in read_subframe_fixed_()
2597 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_TY… in read_subframe_fixed_()
2603 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_PA… in read_subframe_fixed_()
2605 if(decoder->private_->frame.header.blocksize >> u32 < order) { in read_subframe_fixed_()
2611 …subframe->entropy_coding_method.data.partitioned_rice.contents = &decoder->private_->partitioned_r… in read_subframe_fixed_()
2623 …ethod.data.partitioned_rice.order, &decoder->private_->partitioned_rice_contents[channel], decoder… in read_subframe_fixed_()
2632 memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order); in read_subframe_fixed_()
2633 …_restore_signal(decoder->private_->residual[channel], decoder->private_->frame.header.blocksize-or… in read_subframe_fixed_()
2641 FLAC__Subframe_LPC *subframe = &decoder->private_->frame.subframes[channel].data.lpc; in read_subframe_lpc_()
2646 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_LPC; in read_subframe_lpc_()
2648 subframe->residual = decoder->private_->residual[channel]; in read_subframe_lpc_()
2653 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, bps)) in read_subframe_lpc_()
2659 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__SUBFRAME_LPC_QLP_COEFF_P… in read_subframe_lpc_()
2669 …if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, FLAC__SUBFRAME_LPC_QLP_SHIFT_LE… in read_subframe_lpc_()
2680 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, subframe->qlp_coeff_precision)) in read_subframe_lpc_()
2686 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_TY… in read_subframe_lpc_()
2692 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_PA… in read_subframe_lpc_()
2694 if(decoder->private_->frame.header.blocksize >> u32 < order) { in read_subframe_lpc_()
2700 …subframe->entropy_coding_method.data.partitioned_rice.contents = &decoder->private_->partitioned_r… in read_subframe_lpc_()
2712 …ethod.data.partitioned_rice.order, &decoder->private_->partitioned_rice_contents[channel], decoder… in read_subframe_lpc_()
2721 memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order); in read_subframe_lpc_()
2724 …private_->local_lpc_restore_signal_16bit(decoder->private_->residual[channel], decoder->private_->… in read_subframe_lpc_()
2726 …private_->local_lpc_restore_signal(decoder->private_->residual[channel], decoder->private_->frame.… in read_subframe_lpc_()
2728 …private_->local_lpc_restore_signal_64bit(decoder->private_->residual[channel], decoder->private_->… in read_subframe_lpc_()
2736 FLAC__Subframe_Verbatim *subframe = &decoder->private_->frame.subframes[channel].data.verbatim; in read_subframe_verbatim_()
2737 FLAC__int32 x, *residual = decoder->private_->residual[channel]; in read_subframe_verbatim_()
2740 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_VERBATIM; in read_subframe_verbatim_()
2744 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_subframe_verbatim_()
2745 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &x, bps)) in read_subframe_verbatim_()
2752 …memcpy(decoder->private_->output[channel], subframe->data, sizeof(FLAC__int32) * decoder->private_… in read_subframe_verbatim_()
2763 …_samples = partition_order > 0? decoder->private_->frame.header.blocksize >> partition_order : dec… in read_residual_partitioned_rice_()
2768 …FLAC__ASSERT(partition_order > 0? partition_samples >= predictor_order : decoder->private_->frame.… in read_residual_partitioned_rice_()
2777 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &rice_parameter, plen)) in read_residual_partitioned_rice_()
2783 …if(!FLAC__bitreader_read_rice_signed_block(decoder->private_->input, residual + sample, u, rice_pa… in read_residual_partitioned_rice_()
2788 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &rice_parameter, FLAC__ENTROPY_CODIN… in read_residual_partitioned_rice_()
2792 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i, rice_parameter)) in read_residual_partitioned_rice_()
2804 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) { in read_zero_padding_()
2806 …treader_read_raw_uint32(decoder->private_->input, &zero, FLAC__bitreader_bits_left_for_byte_alignm… in read_zero_padding_()
2823 !decoder->private_->is_ogg && in read_callback_()
2825 …decoder->private_->eof_callback && decoder->private_->eof_callback(decoder, decoder->private_->cli… in read_callback_()
2842 if(decoder->private_->is_seeking && decoder->private_->unparseable_frame_count > 20) { in read_callback_()
2849 decoder->private_->is_ogg? in read_callback_()
2852 decoder->private_->read_callback(decoder, buffer, bytes, decoder->private_->client_data) in read_callback_()
2864 !decoder->private_->is_ogg && in read_callback_()
2866 …decoder->private_->eof_callback && decoder->private_->eof_callback(decoder, decoder->private_->cli… in read_callback_()
2899 …gg_decoder_aspect, buffer, bytes, read_callback_proxy_, decoder, decoder->private_->client_data)) { in read_callback_ogg_aspect_()
2927 switch(decoder->private_->read_callback(decoder, buffer, bytes, client_data)) { in read_callback_proxy_()
2944 if(decoder->private_->is_seeking) { in write_audio_frame_to_client_()
2947 FLAC__uint64 target_sample = decoder->private_->target_sample; in write_audio_frame_to_client_()
2952 decoder->private_->got_a_frame = true; in write_audio_frame_to_client_()
2954 decoder->private_->last_frame = *frame; /* save the frame */ in write_audio_frame_to_client_()
2958 decoder->private_->is_seeking = false; in write_audio_frame_to_client_()
2965 decoder->private_->last_frame.header.blocksize -= delta; in write_audio_frame_to_client_()
2966 decoder->private_->last_frame.header.number.sample_number += (FLAC__uint64)delta; in write_audio_frame_to_client_()
2968 …return decoder->private_->write_callback(decoder, &decoder->private_->last_frame, newbuffer, decod… in write_audio_frame_to_client_()
2972 … return decoder->private_->write_callback(decoder, frame, buffer, decoder->private_->client_data); in write_audio_frame_to_client_()
2984 if(!decoder->private_->has_stream_info) in write_audio_frame_to_client_()
2985 decoder->private_->do_md5_checking = false; in write_audio_frame_to_client_()
2986 if(decoder->private_->do_md5_checking) { in write_audio_frame_to_client_()
2987 …if(!FLAC__MD5Accumulate(&decoder->private_->md5context, buffer, frame->header.channels, frame->hea… in write_audio_frame_to_client_()
2990 return decoder->private_->write_callback(decoder, frame, buffer, decoder->private_->client_data); in write_audio_frame_to_client_()
2996 if(!decoder->private_->is_seeking) in send_error_to_client_()
2997 decoder->private_->error_callback(decoder, status, decoder->private_->client_data); in send_error_to_client_()
2999 decoder->private_->unparseable_frame_count++; in send_error_to_client_()
3004 …FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound,… in seek_to_absolute_sample_()
3010 const unsigned min_blocksize = decoder->private_->stream_info.data.stream_info.min_blocksize; in seek_to_absolute_sample_()
3011 const unsigned max_blocksize = decoder->private_->stream_info.data.stream_info.max_blocksize; in seek_to_absolute_sample_()
3012 const unsigned max_framesize = decoder->private_->stream_info.data.stream_info.max_framesize; in seek_to_absolute_sample_()
3013 const unsigned min_framesize = decoder->private_->stream_info.data.stream_info.min_framesize; in seek_to_absolute_sample_()
3017 …FLAC__StreamMetadata_SeekTable *seek_table = decoder->private_->has_seek_table? &decoder->private_… in seek_to_absolute_sample_()
3021 channels = decoder->private_->stream_info.data.stream_info.channels; in seek_to_absolute_sample_()
3023 bps = decoder->private_->stream_info.data.stream_info.bits_per_sample; in seek_to_absolute_sample_()
3117 decoder->private_->target_sample = target_sample; in seek_to_absolute_sample_()
3137 …if(decoder->private_->seek_callback(decoder, (FLAC__uint64)pos, decoder->private_->client_data) !=… in seek_to_absolute_sample_()
3151 decoder->private_->unparseable_frame_count = 0; in seek_to_absolute_sample_()
3163 if(!decoder->private_->is_seeking) in seek_to_absolute_sample_()
3166 …FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NU… in seek_to_absolute_sample_()
3167 this_frame_sample = decoder->private_->last_frame.header.number.sample_number; in seek_to_absolute_sample_()
3169 …if (0 == decoder->private_->samples_decoded || (this_frame_sample + decoder->private_->last_frame.… in seek_to_absolute_sample_()
3190 upper_bound_sample = this_frame_sample + decoder->private_->last_frame.header.blocksize; in seek_to_absolute_sample_()
3199 lower_bound_sample = this_frame_sample + decoder->private_->last_frame.header.blocksize; in seek_to_absolute_sample_()
3241 decoder->private_->target_sample = target_sample; in seek_to_absolute_sample_ogg_()
3265 …if(decoder->private_->seek_callback((FLAC__StreamDecoder*)decoder, (FLAC__uint64)pos, decoder->pri… in seek_to_absolute_sample_ogg_()
3278 decoder->private_->got_a_frame = false; in seek_to_absolute_sample_ogg_()
3283 if(!decoder->private_->got_a_frame) { in seek_to_absolute_sample_ogg_()
3301 else if(!decoder->private_->is_seeking) { in seek_to_absolute_sample_ogg_()
3305 this_frame_sample = decoder->private_->last_frame.header.number.sample_number; in seek_to_absolute_sample_ogg_()
3306 …FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NU… in seek_to_absolute_sample_ogg_()
3348 *bytes = fread(buffer, sizeof(FLAC__byte), *bytes, decoder->private_->file); in file_read_callback_()
3349 if(ferror(decoder->private_->file)) in file_read_callback_()
3364 if(decoder->private_->file == stdin) in file_seek_callback_()
3366 else if(fseeko(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0) in file_seek_callback_()
3377 if(decoder->private_->file == stdin) in file_tell_callback_()
3379 else if((pos = ftello(decoder->private_->file)) < 0) in file_tell_callback_()
3392 if(decoder->private_->file == stdin) in file_length_callback_()
3394 else if(flac_fstat(fileno(decoder->private_->file), &filestats) != 0) in file_length_callback_()
3406 return feof(decoder->private_->file)? true : false; in file_eof_callback_()