• Home
  • Raw
  • Download

Lines Matching refs:private_

297 	decoder->private_ = (FLAC__StreamDecoderPrivate*)calloc(1, sizeof(FLAC__StreamDecoderPrivate));  in FLAC__stream_decoder_new()
298 if(decoder->private_ == 0) { in FLAC__stream_decoder_new()
304 decoder->private_->input = FLAC__bitreader_new(); in FLAC__stream_decoder_new()
305 if(decoder->private_->input == 0) { in FLAC__stream_decoder_new()
306 free(decoder->private_); in FLAC__stream_decoder_new()
312 decoder->private_->metadata_filter_ids_capacity = 16; in FLAC__stream_decoder_new()
313 …if(0 == (decoder->private_->metadata_filter_ids = (FLAC__byte*)malloc((FLAC__STREAM_METADATA_APPLI… in FLAC__stream_decoder_new()
314 FLAC__bitreader_delete(decoder->private_->input); in FLAC__stream_decoder_new()
315 free(decoder->private_); in FLAC__stream_decoder_new()
322 decoder->private_->output[i] = 0; in FLAC__stream_decoder_new()
323 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in FLAC__stream_decoder_new()
326 decoder->private_->output_capacity = 0; in FLAC__stream_decoder_new()
327 decoder->private_->output_channels = 0; in FLAC__stream_decoder_new()
328 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_new()
331 …FLAC__format_entropy_coding_method_partitioned_rice_contents_init(&decoder->private_->partitioned_… in FLAC__stream_decoder_new()
333 decoder->private_->file = 0; in FLAC__stream_decoder_new()
348 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_delete()
349 FLAC__ASSERT(0 != decoder->private_->input); in FLAC__stream_decoder_delete()
353 if(0 != decoder->private_->metadata_filter_ids) in FLAC__stream_decoder_delete()
354 free(decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_delete()
356 FLAC__bitreader_delete(decoder->private_->input); in FLAC__stream_decoder_delete()
359 …FLAC__format_entropy_coding_method_partitioned_rice_contents_clear(&decoder->private_->partitioned… in FLAC__stream_decoder_delete()
361 free(decoder->private_); in FLAC__stream_decoder_delete()
405 decoder->private_->is_ogg = is_ogg; in init_stream_internal_()
413 FLAC__cpu_info(&decoder->private_->cpuinfo); in init_stream_internal_()
415 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal; in init_stream_internal_()
416 decoder->private_->local_lpc_restore_signal_64bit = FLAC__lpc_restore_signal_wide; in init_stream_internal_()
417 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal; in init_stream_internal_()
418 decoder->private_->local_lpc_restore_signal_16bit_order8 = FLAC__lpc_restore_signal; in init_stream_internal_()
419 decoder->private_->local_bitreader_read_rice_signed_block = FLAC__bitreader_read_rice_signed_block; in init_stream_internal_()
422 if(decoder->private_->cpuinfo.use_asm) { in init_stream_internal_()
424 FLAC__ASSERT(decoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_IA32); in init_stream_internal_()
427 if(decoder->private_->cpuinfo.data.ia32.bswap) in init_stream_internal_()
428 …decoder->private_->local_bitreader_read_rice_signed_block = FLAC__bitreader_read_rice_signed_block… in init_stream_internal_()
430 if(decoder->private_->cpuinfo.data.ia32.mmx) { in init_stream_internal_()
431 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
432 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32_mmx; in init_stream_internal_()
433 decoder->private_->local_lpc_restore_signal_16bit_order8 = FLAC__lpc_restore_signal_asm_ia32_mmx; in init_stream_internal_()
436 decoder->private_->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
437 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
438 decoder->private_->local_lpc_restore_signal_16bit_order8 = FLAC__lpc_restore_signal_asm_ia32; in init_stream_internal_()
442 FLAC__ASSERT(decoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_PPC); in init_stream_internal_()
443 if(decoder->private_->cpuinfo.data.ppc.altivec) { in init_stream_internal_()
444 decoder->private_->local_lpc_restore_signal_16bit = FLAC__lpc_restore_signal_asm_ppc_altivec_16; in init_stream_internal_()
445 …decoder->private_->local_lpc_restore_signal_16bit_order8 = FLAC__lpc_restore_signal_asm_ppc_altive… in init_stream_internal_()
453 …if(!FLAC__bitreader_init(decoder->private_->input, decoder->private_->cpuinfo, read_callback_, dec… in init_stream_internal_()
458 decoder->private_->read_callback = read_callback; in init_stream_internal_()
459 decoder->private_->seek_callback = seek_callback; in init_stream_internal_()
460 decoder->private_->tell_callback = tell_callback; in init_stream_internal_()
461 decoder->private_->length_callback = length_callback; in init_stream_internal_()
462 decoder->private_->eof_callback = eof_callback; in init_stream_internal_()
463 decoder->private_->write_callback = write_callback; in init_stream_internal_()
464 decoder->private_->metadata_callback = metadata_callback; in init_stream_internal_()
465 decoder->private_->error_callback = error_callback; in init_stream_internal_()
466 decoder->private_->client_data = client_data; in init_stream_internal_()
467 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size = 0; in init_stream_internal_()
468 decoder->private_->samples_decoded = 0; in init_stream_internal_()
469 decoder->private_->has_stream_info = false; in init_stream_internal_()
470 decoder->private_->cached = false; in init_stream_internal_()
472 decoder->private_->do_md5_checking = decoder->protected_->md5_checking; in init_stream_internal_()
473 decoder->private_->is_seeking = false; in init_stream_internal_()
475 …decoder->private_->internal_reset_hack = true; /* so the following reset does not try to rewind th… in init_stream_internal_()
567 decoder->private_->file = file; in init_FILE_internal_()
572 decoder->private_->file == stdin? 0: file_seek_callback_, in init_FILE_internal_()
573 decoder->private_->file == stdin? 0: file_tell_callback_, in init_FILE_internal_()
574 decoder->private_->file == stdin? 0: file_length_callback_, in init_FILE_internal_()
671 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_finish()
681 FLAC__MD5Final(decoder->private_->computed_md5sum, &decoder->private_->md5context); in FLAC__stream_decoder_finish()
684 …if(decoder->private_->has_seek_table && 0 != decoder->private_->seek_table.data.seek_table.points)… in FLAC__stream_decoder_finish()
685 free(decoder->private_->seek_table.data.seek_table.points); in FLAC__stream_decoder_finish()
686 decoder->private_->seek_table.data.seek_table.points = 0; in FLAC__stream_decoder_finish()
687 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_finish()
689 FLAC__bitreader_free(decoder->private_->input); in FLAC__stream_decoder_finish()
697 if(0 != decoder->private_->output[i]) { in FLAC__stream_decoder_finish()
698 free(decoder->private_->output[i]-4); in FLAC__stream_decoder_finish()
699 decoder->private_->output[i] = 0; in FLAC__stream_decoder_finish()
701 if(0 != decoder->private_->residual_unaligned[i]) { in FLAC__stream_decoder_finish()
702 free(decoder->private_->residual_unaligned[i]); in FLAC__stream_decoder_finish()
703 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in FLAC__stream_decoder_finish()
706 decoder->private_->output_capacity = 0; in FLAC__stream_decoder_finish()
707 decoder->private_->output_channels = 0; in FLAC__stream_decoder_finish()
710 if(decoder->private_->is_ogg) in FLAC__stream_decoder_finish()
714 if(0 != decoder->private_->file) { in FLAC__stream_decoder_finish()
715 if(decoder->private_->file != stdin) in FLAC__stream_decoder_finish()
716 fclose(decoder->private_->file); in FLAC__stream_decoder_finish()
717 decoder->private_->file = 0; in FLAC__stream_decoder_finish()
720 if(decoder->private_->do_md5_checking) { in FLAC__stream_decoder_finish()
721 …if(memcmp(decoder->private_->stream_info.data.stream_info.md5sum, decoder->private_->computed_md5s… in FLAC__stream_decoder_finish()
724 decoder->private_->is_seeking = false; in FLAC__stream_decoder_finish()
736 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_ogg_serial_number()
763 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond()
771 decoder->private_->metadata_filter[type] = true; in FLAC__stream_decoder_set_metadata_respond()
773 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_respond()
780 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond_application()
786 if(decoder->private_->metadata_filter[FLAC__METADATA_TYPE_APPLICATION]) in FLAC__stream_decoder_set_metadata_respond_application()
789 FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_set_metadata_respond_application()
791 …if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity… in FLAC__stream_decoder_set_metadata_respond_application()
792 … == (decoder->private_->metadata_filter_ids = (FLAC__byte*)safe_realloc_mul_2op_(decoder->private_ in FLAC__stream_decoder_set_metadata_respond_application()
796 decoder->private_->metadata_filter_ids_capacity *= 2; in FLAC__stream_decoder_set_metadata_respond_application()
799 …memcpy(decoder->private_->metadata_filter_ids + decoder->private_->metadata_filter_ids_count * (FL… in FLAC__stream_decoder_set_metadata_respond_application()
800 decoder->private_->metadata_filter_ids_count++; in FLAC__stream_decoder_set_metadata_respond_application()
809 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_respond_all()
813 …for(i = 0; i < sizeof(decoder->private_->metadata_filter) / sizeof(decoder->private_->metadata_fil… in FLAC__stream_decoder_set_metadata_respond_all()
814 decoder->private_->metadata_filter[i] = true; in FLAC__stream_decoder_set_metadata_respond_all()
815 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_respond_all()
822 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore()
830 decoder->private_->metadata_filter[type] = false; in FLAC__stream_decoder_set_metadata_ignore()
832 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_ignore()
839 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore_application()
845 if(!decoder->private_->metadata_filter[FLAC__METADATA_TYPE_APPLICATION]) in FLAC__stream_decoder_set_metadata_ignore_application()
848 FLAC__ASSERT(0 != decoder->private_->metadata_filter_ids); in FLAC__stream_decoder_set_metadata_ignore_application()
850 …if(decoder->private_->metadata_filter_ids_count == decoder->private_->metadata_filter_ids_capacity… in FLAC__stream_decoder_set_metadata_ignore_application()
851 … == (decoder->private_->metadata_filter_ids = (FLAC__byte*)safe_realloc_mul_2op_(decoder->private_ in FLAC__stream_decoder_set_metadata_ignore_application()
855 decoder->private_->metadata_filter_ids_capacity *= 2; in FLAC__stream_decoder_set_metadata_ignore_application()
858 …memcpy(decoder->private_->metadata_filter_ids + decoder->private_->metadata_filter_ids_count * (FL… in FLAC__stream_decoder_set_metadata_ignore_application()
859 decoder->private_->metadata_filter_ids_count++; in FLAC__stream_decoder_set_metadata_ignore_application()
867 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_set_metadata_ignore_all()
871 memset(decoder->private_->metadata_filter, 0, sizeof(decoder->private_->metadata_filter)); in FLAC__stream_decoder_set_metadata_ignore_all()
872 decoder->private_->metadata_filter_ids_count = 0; in FLAC__stream_decoder_set_metadata_ignore_all()
899 …return decoder->private_->has_stream_info? decoder->private_->stream_info.data.stream_info.total_s… in FLAC__stream_decoder_get_total_samples()
940 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_get_decode_position()
944 if(decoder->private_->is_ogg) in FLAC__stream_decoder_get_decode_position()
947 if(0 == decoder->private_->tell_callback) in FLAC__stream_decoder_get_decode_position()
949 …if(decoder->private_->tell_callback(decoder, position, decoder->private_->client_data) != FLAC__ST… in FLAC__stream_decoder_get_decode_position()
952 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) in FLAC__stream_decoder_get_decode_position()
962 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_flush()
965 decoder->private_->samples_decoded = 0; in FLAC__stream_decoder_flush()
966 decoder->private_->do_md5_checking = false; in FLAC__stream_decoder_flush()
969 if(decoder->private_->is_ogg) in FLAC__stream_decoder_flush()
973 if(!FLAC__bitreader_clear(decoder->private_->input)) { in FLAC__stream_decoder_flush()
985 FLAC__ASSERT(0 != decoder->private_); in FLAC__stream_decoder_reset()
995 if(decoder->private_->is_ogg) in FLAC__stream_decoder_reset()
1004 if(!decoder->private_->internal_reset_hack) { in FLAC__stream_decoder_reset()
1005 if(decoder->private_->file == stdin) in FLAC__stream_decoder_reset()
1007 …if(decoder->private_->seek_callback && decoder->private_->seek_callback(decoder, 0, decoder->priva… in FLAC__stream_decoder_reset()
1011 decoder->private_->internal_reset_hack = false; in FLAC__stream_decoder_reset()
1015 decoder->private_->has_stream_info = false; in FLAC__stream_decoder_reset()
1016 …if(decoder->private_->has_seek_table && 0 != decoder->private_->seek_table.data.seek_table.points)… in FLAC__stream_decoder_reset()
1017 free(decoder->private_->seek_table.data.seek_table.points); in FLAC__stream_decoder_reset()
1018 decoder->private_->seek_table.data.seek_table.points = 0; in FLAC__stream_decoder_reset()
1019 decoder->private_->has_seek_table = false; in FLAC__stream_decoder_reset()
1021 decoder->private_->do_md5_checking = decoder->protected_->md5_checking; in FLAC__stream_decoder_reset()
1026 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size = 0; in FLAC__stream_decoder_reset()
1035 FLAC__MD5Init(&decoder->private_->md5context); in FLAC__stream_decoder_reset()
1038 decoder->private_->first_frame_offset = 0; in FLAC__stream_decoder_reset()
1039 decoder->private_->unparseable_frame_count = 0; in FLAC__stream_decoder_reset()
1188 if(0 == decoder->private_->seek_callback) in FLAC__stream_decoder_seek_absolute()
1191 FLAC__ASSERT(decoder->private_->seek_callback); in FLAC__stream_decoder_seek_absolute()
1192 FLAC__ASSERT(decoder->private_->tell_callback); in FLAC__stream_decoder_seek_absolute()
1193 FLAC__ASSERT(decoder->private_->length_callback); in FLAC__stream_decoder_seek_absolute()
1194 FLAC__ASSERT(decoder->private_->eof_callback); in FLAC__stream_decoder_seek_absolute()
1199 decoder->private_->is_seeking = true; in FLAC__stream_decoder_seek_absolute()
1202 decoder->private_->do_md5_checking = false; in FLAC__stream_decoder_seek_absolute()
1205 …if(decoder->private_->length_callback(decoder, &length, decoder->private_->client_data) != FLAC__S… in FLAC__stream_decoder_seek_absolute()
1206 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1217 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1222 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1230 decoder->private_->is_ogg? in FLAC__stream_decoder_seek_absolute()
1235 decoder->private_->is_seeking = false; in FLAC__stream_decoder_seek_absolute()
1249 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in FLAC__stream_decoder_get_input_bytes_unconsumed()
1250 FLAC__ASSERT(!(FLAC__bitreader_get_input_bits_unconsumed(decoder->private_->input) & 7)); in FLAC__stream_decoder_get_input_bytes_unconsumed()
1251 return FLAC__bitreader_get_input_bits_unconsumed(decoder->private_->input) / 8; in FLAC__stream_decoder_get_input_bytes_unconsumed()
1263 decoder->private_->is_ogg = false; in set_defaults_()
1265 decoder->private_->read_callback = 0; in set_defaults_()
1266 decoder->private_->seek_callback = 0; in set_defaults_()
1267 decoder->private_->tell_callback = 0; in set_defaults_()
1268 decoder->private_->length_callback = 0; in set_defaults_()
1269 decoder->private_->eof_callback = 0; in set_defaults_()
1270 decoder->private_->write_callback = 0; in set_defaults_()
1271 decoder->private_->metadata_callback = 0; in set_defaults_()
1272 decoder->private_->error_callback = 0; in set_defaults_()
1273 decoder->private_->client_data = 0; in set_defaults_()
1275 memset(decoder->private_->metadata_filter, 0, sizeof(decoder->private_->metadata_filter)); in set_defaults_()
1276 decoder->private_->metadata_filter[FLAC__METADATA_TYPE_STREAMINFO] = true; in set_defaults_()
1277 decoder->private_->metadata_filter_ids_count = 0; in set_defaults_()
1312 if(size <= decoder->private_->output_capacity && channels <= decoder->private_->output_channels) in allocate_output_()
1318 if(0 != decoder->private_->output[i]) { in allocate_output_()
1319 free(decoder->private_->output[i]-4); in allocate_output_()
1320 decoder->private_->output[i] = 0; in allocate_output_()
1322 if(0 != decoder->private_->residual_unaligned[i]) { in allocate_output_()
1323 free(decoder->private_->residual_unaligned[i]); in allocate_output_()
1324 decoder->private_->residual_unaligned[i] = decoder->private_->residual[i] = 0; in allocate_output_()
1341 decoder->private_->output[i] = tmp + 4; in allocate_output_()
1346 …__memory_alloc_aligned_int32_array(size, &decoder->private_->residual_unaligned[i], &decoder->priv… in allocate_output_()
1352 decoder->private_->output_capacity = size; in allocate_output_()
1353 decoder->private_->output_channels = channels; in allocate_output_()
1363 FLAC__ASSERT(0 != decoder->private_); in has_id_filtered_()
1365 for(i = 0; i < decoder->private_->metadata_filter_ids_count; i++) in has_id_filtered_()
1366 …if(0 == memcmp(decoder->private_->metadata_filter_ids + i * (FLAC__STREAM_METADATA_APPLICATION_ID_… in has_id_filtered_()
1378 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in find_metadata_()
1381 if(decoder->private_->cached) { in find_metadata_()
1382 x = (FLAC__uint32)decoder->private_->lookahead; in find_metadata_()
1383 decoder->private_->cached = false; in find_metadata_()
1386 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in find_metadata_()
1406 decoder->private_->header_warmup[0] = (FLAC__byte)x; in find_metadata_()
1407 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in find_metadata_()
1413 decoder->private_->lookahead = (FLAC__byte)x; in find_metadata_()
1414 decoder->private_->cached = true; in find_metadata_()
1417 decoder->private_->header_warmup[1] = (FLAC__byte)x; in find_metadata_()
1438 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_()
1440 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_IS_LAST_LE… in read_metadata_()
1444 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &type, FLAC__STREAM_METADATA_TYPE_LE… in read_metadata_()
1447 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &length, FLAC__STREAM_METADATA_LENGT… in read_metadata_()
1454 decoder->private_->has_stream_info = true; in read_metadata_()
1455 …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_()
1456 decoder->private_->do_md5_checking = false; in read_metadata_()
1457 …if(!decoder->private_->is_seeking && decoder->private_->metadata_filter[FLAC__METADATA_TYPE_STREAM… in read_metadata_()
1458 …decoder->private_->metadata_callback(decoder, &decoder->private_->stream_info, decoder->private_->… in read_metadata_()
1464 decoder->private_->has_seek_table = true; in read_metadata_()
1465 …if(!decoder->private_->is_seeking && decoder->private_->metadata_filter[FLAC__METADATA_TYPE_SEEKTA… in read_metadata_()
1466 …decoder->private_->metadata_callback(decoder, &decoder->private_->seek_table, decoder->private_->c… in read_metadata_()
1469 FLAC__bool skip_it = !decoder->private_->metadata_filter[type]; in read_metadata_()
1478 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.applicatio… in read_metadata_()
1488 …if(decoder->private_->metadata_filter_ids_count > 0 && has_id_filtered_(decoder, block.data.applic… in read_metadata_()
1493 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, real_length)) in read_metadata_()
1500 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, real_length)) in read_metadata_()
1510 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.applicatio… in read_metadata_()
1538 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.unknown.da… in read_metadata_()
1545 if(!decoder->private_->is_seeking && decoder->private_->metadata_callback) in read_metadata_()
1546 decoder->private_->metadata_callback(decoder, &block, decoder->private_->client_data); in read_metadata_()
1595 if(!FLAC__stream_decoder_get_decode_position(decoder, &decoder->private_->first_frame_offset)) in read_metadata_()
1596 decoder->private_->first_frame_offset = 0; in read_metadata_()
1608 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_streaminfo_()
1610 decoder->private_->stream_info.type = FLAC__METADATA_TYPE_STREAMINFO; in read_metadata_streaminfo_()
1611 decoder->private_->stream_info.is_last = is_last; in read_metadata_streaminfo_()
1612 decoder->private_->stream_info.length = length; in read_metadata_streaminfo_()
1615 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, bits)) in read_metadata_streaminfo_()
1617 decoder->private_->stream_info.data.stream_info.min_blocksize = x; in read_metadata_streaminfo_()
1621 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1623 decoder->private_->stream_info.data.stream_info.max_blocksize = x; in read_metadata_streaminfo_()
1627 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1629 decoder->private_->stream_info.data.stream_info.min_framesize = x; in read_metadata_streaminfo_()
1633 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1635 decoder->private_->stream_info.data.stream_info.max_framesize = x; in read_metadata_streaminfo_()
1639 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1641 decoder->private_->stream_info.data.stream_info.sample_rate = x; in read_metadata_streaminfo_()
1645 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1647 decoder->private_->stream_info.data.stream_info.channels = x+1; in read_metadata_streaminfo_()
1651 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_STREAMINFO… in read_metadata_streaminfo_()
1653 decoder->private_->stream_info.data.stream_info.bits_per_sample = x+1; in read_metadata_streaminfo_()
1657 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &decoder->private_->stream_info.data… in read_metadata_streaminfo_()
1661 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, decoder->private_->st… in read_metadata_streaminfo_()
1668 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_streaminfo_()
1679 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_seektable_()
1681 decoder->private_->seek_table.type = FLAC__METADATA_TYPE_SEEKTABLE; in read_metadata_seektable_()
1682 decoder->private_->seek_table.is_last = is_last; in read_metadata_seektable_()
1683 decoder->private_->seek_table.length = length; in read_metadata_seektable_()
1685 …decoder->private_->seek_table.data.seek_table.num_points = length / FLAC__STREAM_METADATA_SEEKPOIN… in read_metadata_seektable_()
1688private_->seek_table.data.seek_table.points = (FLAC__StreamMetadata_SeekPoint*)safe_realloc_mul_2o… in read_metadata_seektable_()
1692 for(i = 0; i < decoder->private_->seek_table.data.seek_table.num_points; i++) { in read_metadata_seektable_()
1693 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &xx, FLAC__STREAM_METADATA_SEEKPOINT… in read_metadata_seektable_()
1695 decoder->private_->seek_table.data.seek_table.points[i].sample_number = xx; in read_metadata_seektable_()
1697 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &xx, FLAC__STREAM_METADATA_SEEKPOINT… in read_metadata_seektable_()
1699 decoder->private_->seek_table.data.seek_table.points[i].stream_offset = xx; in read_metadata_seektable_()
1701 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_SEEKPOINT_… in read_metadata_seektable_()
1703 decoder->private_->seek_table.data.seek_table.points[i].frame_samples = x; in read_metadata_seektable_()
1705 …length -= (decoder->private_->seek_table.data.seek_table.num_points * FLAC__STREAM_METADATA_SEEKPO… in read_metadata_seektable_()
1709 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, length)) in read_metadata_seektable_()
1720 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_vorbiscomment_()
1724 …if(!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->vendor_string.length… in read_metadata_vorbiscomment_()
1731 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->vendor_string.en… in read_metadata_vorbiscomment_()
1740 if(!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->num_comments)) in read_metadata_vorbiscomment_()
1751 … if(!FLAC__bitreader_read_uint32_little_endian(decoder->private_->input, &obj->comments[i].length)) in read_metadata_vorbiscomment_()
1758 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entr… in read_metadata_vorbiscomment_()
1777 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_cuesheet_()
1782 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)obj->med… in read_metadata_cuesheet_()
1785 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &obj->lead_in, FLAC__STREAM_METADATA… in read_metadata_cuesheet_()
1788 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_I… in read_metadata_cuesheet_()
1792 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_RESE… in read_metadata_cuesheet_()
1795 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_N… in read_metadata_cuesheet_()
1806 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &track->offset, FLAC__STREAM_METADAT… in read_metadata_cuesheet_()
1809 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1814 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)track->i… in read_metadata_cuesheet_()
1817 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1821 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1825 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_TRAC… in read_metadata_cuesheet_()
1828 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_T… in read_metadata_cuesheet_()
1839 …if(!FLAC__bitreader_read_raw_uint64(decoder->private_->input, &index->offset, FLAC__STREAM_METADAT… in read_metadata_cuesheet_()
1842 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_CUESHEET_I… in read_metadata_cuesheet_()
1846 …if(!FLAC__bitreader_skip_bits_no_crc(decoder->private_->input, FLAC__STREAM_METADATA_CUESHEET_INDE… in read_metadata_cuesheet_()
1860 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_metadata_picture_()
1863 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_TY… in read_metadata_picture_()
1868 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_MI… in read_metadata_picture_()
1875 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, (FLAC__byte*)obj->mim… in read_metadata_picture_()
1881 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__STREAM_METADATA_PICTURE_DE… in read_metadata_picture_()
1888 if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->description, x)) in read_metadata_picture_()
1894 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->width, FLAC__STREAM_METADATA_P… in read_metadata_picture_()
1898 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->height, FLAC__STREAM_METADATA_… in read_metadata_picture_()
1902 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->depth, FLAC__STREAM_METADATA_P… in read_metadata_picture_()
1906 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &obj->colors, FLAC__STREAM_METADATA_… in read_metadata_picture_()
1910 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &(obj->data_length), FLAC__STREAM_ME… in read_metadata_picture_()
1917 …if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->data, obj->data_… in read_metadata_picture_()
1930 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 24)) in skip_id3v2_tag_()
1935 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in skip_id3v2_tag_()
1941 if(!FLAC__bitreader_skip_byte_block_aligned_no_crc(decoder->private_->input, skip)) in skip_id3v2_tag_()
1954 if(decoder->private_->samples_decoded >= FLAC__stream_decoder_get_total_samples(decoder)) { in frame_sync_()
1961 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) { in frame_sync_()
1962 …bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__bitreader_bits_left_for_byte_alignme… in frame_sync_()
1967 if(decoder->private_->cached) { in frame_sync_()
1968 x = (FLAC__uint32)decoder->private_->lookahead; in frame_sync_()
1969 decoder->private_->cached = false; in frame_sync_()
1972 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in frame_sync_()
1976 decoder->private_->header_warmup[0] = (FLAC__byte)x; in frame_sync_()
1977 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in frame_sync_()
1983 decoder->private_->lookahead = (FLAC__byte)x; in frame_sync_()
1984 decoder->private_->cached = true; in frame_sync_()
1987 decoder->private_->header_warmup[1] = (FLAC__byte)x; in frame_sync_()
2013 frame_crc = FLAC__CRC16_UPDATE(decoder->private_->header_warmup[0], frame_crc); in read_frame_()
2014 frame_crc = FLAC__CRC16_UPDATE(decoder->private_->header_warmup[1], frame_crc); in read_frame_()
2015 FLAC__bitreader_reset_read_crc16(decoder->private_->input, (FLAC__uint16)frame_crc); in read_frame_()
2021 …if(!allocate_output_(decoder, decoder->private_->frame.header.blocksize, decoder->private_->frame.… in read_frame_()
2023 for(channel = 0; channel < decoder->private_->frame.header.channels; channel++) { in read_frame_()
2027 unsigned bps = decoder->private_->frame.header.bits_per_sample; in read_frame_()
2028 switch(decoder->private_->frame.header.channel_assignment) { in read_frame_()
2033 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2038 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2043 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2066 frame_crc = FLAC__bitreader_get_read_crc16(decoder->private_->input); in read_frame_()
2067 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, FLAC__FRAME_FOOTER_CRC_LEN)) in read_frame_()
2072 switch(decoder->private_->frame.header.channel_assignment) { in read_frame_()
2077 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2078 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_frame_()
2079 …decoder->private_->output[1][i] = decoder->private_->output[0][i] - decoder->private_->output[1][i… in read_frame_()
2082 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2083 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_frame_()
2084 decoder->private_->output[0][i] += decoder->private_->output[1][i]; in read_frame_()
2087 FLAC__ASSERT(decoder->private_->frame.header.channels == 2); in read_frame_()
2088 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_frame_()
2090 mid = decoder->private_->output[0][i]; in read_frame_()
2091 side = decoder->private_->output[1][i]; in read_frame_()
2094 decoder->private_->output[0][i] = (mid + side) >> 1; in read_frame_()
2095 decoder->private_->output[1][i] = (mid - side) >> 1; in read_frame_()
2098 …mid = (decoder->private_->output[0][i] << 1) | (decoder->private_->output[1][i] & 1); /* i.e. if '… in read_frame_()
2099 decoder->private_->output[0][i] = (mid + decoder->private_->output[1][i]) >> 1; in read_frame_()
2100 decoder->private_->output[1][i] = (mid - decoder->private_->output[1][i]) >> 1; in read_frame_()
2114 for(channel = 0; channel < decoder->private_->frame.header.channels; channel++) { in read_frame_()
2115 …memset(decoder->private_->output[channel], 0, sizeof(FLAC__int32) * decoder->private_->frame.heade… in read_frame_()
2123 if(decoder->private_->next_fixed_block_size) in read_frame_()
2124 decoder->private_->fixed_block_size = decoder->private_->next_fixed_block_size; in read_frame_()
2127 decoder->protected_->channels = decoder->private_->frame.header.channels; in read_frame_()
2128 decoder->protected_->channel_assignment = decoder->private_->frame.header.channel_assignment; in read_frame_()
2129 decoder->protected_->bits_per_sample = decoder->private_->frame.header.bits_per_sample; in read_frame_()
2130 decoder->protected_->sample_rate = decoder->private_->frame.header.sample_rate; in read_frame_()
2131 decoder->protected_->blocksize = decoder->private_->frame.header.blocksize; in read_frame_()
2133 FLAC__ASSERT(decoder->private_->frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER); in read_frame_()
2134 …decoder->private_->samples_decoded = decoder->private_->frame.header.number.sample_number + decode… in read_frame_()
2138 …te_audio_frame_to_client_(decoder, &decoder->private_->frame, (const FLAC__int32 * const *)decoder… in read_frame_()
2155 FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); in read_frame_header_()
2158 raw_header[0] = decoder->private_->header_warmup[0]; in read_frame_header_()
2159 raw_header[1] = decoder->private_->header_warmup[1]; in read_frame_header_()
2189 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2193 decoder->private_->lookahead = (FLAC__byte)x; in read_frame_header_()
2194 decoder->private_->cached = true; in read_frame_header_()
2207 decoder->private_->frame.header.blocksize = 192; in read_frame_header_()
2213 decoder->private_->frame.header.blocksize = 576 << (x-2); in read_frame_header_()
2227 decoder->private_->frame.header.blocksize = 256 << (x-8); in read_frame_header_()
2236 if(decoder->private_->has_stream_info) in read_frame_header_()
2237 …decoder->private_->frame.header.sample_rate = decoder->private_->stream_info.data.stream_info.samp… in read_frame_header_()
2242 decoder->private_->frame.header.sample_rate = 88200; in read_frame_header_()
2245 decoder->private_->frame.header.sample_rate = 176400; in read_frame_header_()
2248 decoder->private_->frame.header.sample_rate = 192000; in read_frame_header_()
2251 decoder->private_->frame.header.sample_rate = 8000; in read_frame_header_()
2254 decoder->private_->frame.header.sample_rate = 16000; in read_frame_header_()
2257 decoder->private_->frame.header.sample_rate = 22050; in read_frame_header_()
2260 decoder->private_->frame.header.sample_rate = 24000; in read_frame_header_()
2263 decoder->private_->frame.header.sample_rate = 32000; in read_frame_header_()
2266 decoder->private_->frame.header.sample_rate = 44100; in read_frame_header_()
2269 decoder->private_->frame.header.sample_rate = 48000; in read_frame_header_()
2272 decoder->private_->frame.header.sample_rate = 96000; in read_frame_header_()
2289 decoder->private_->frame.header.channels = 2; in read_frame_header_()
2292 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE; in read_frame_header_()
2295 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE; in read_frame_header_()
2298 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_MID_SIDE; in read_frame_header_()
2306 decoder->private_->frame.header.channels = (unsigned)x + 1; in read_frame_header_()
2307 decoder->private_->frame.header.channel_assignment = FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT; in read_frame_header_()
2312 if(decoder->private_->has_stream_info) in read_frame_header_()
2313 …decoder->private_->frame.header.bits_per_sample = decoder->private_->stream_info.data.stream_info.… in read_frame_header_()
2318 decoder->private_->frame.header.bits_per_sample = 8; in read_frame_header_()
2321 decoder->private_->frame.header.bits_per_sample = 12; in read_frame_header_()
2324 decoder->private_->frame.header.bits_per_sample = 16; in read_frame_header_()
2327 decoder->private_->frame.header.bits_per_sample = 20; in read_frame_header_()
2330 decoder->private_->frame.header.bits_per_sample = 24; in read_frame_header_()
2349 …(decoder->private_->has_stream_info && decoder->private_->stream_info.data.stream_info.min_blocksi… in read_frame_header_()
2351 if(!FLAC__bitreader_read_utf8_uint64(decoder->private_->input, &xx, raw_header, &raw_header_len)) in read_frame_header_()
2354 decoder->private_->lookahead = raw_header[raw_header_len-1]; /* back up as much as we can */ in read_frame_header_()
2355 decoder->private_->cached = true; in read_frame_header_()
2360 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER; in read_frame_header_()
2361 decoder->private_->frame.header.number.sample_number = xx; in read_frame_header_()
2364 if(!FLAC__bitreader_read_utf8_uint32(decoder->private_->input, &x, raw_header, &raw_header_len)) in read_frame_header_()
2367 decoder->private_->lookahead = raw_header[raw_header_len-1]; /* back up as much as we can */ in read_frame_header_()
2368 decoder->private_->cached = true; in read_frame_header_()
2373 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER; in read_frame_header_()
2374 decoder->private_->frame.header.number.frame_number = x; in read_frame_header_()
2378 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2383 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &_x, 8)) in read_frame_header_()
2388 decoder->private_->frame.header.blocksize = x+1; in read_frame_header_()
2392 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2397 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &_x, 8)) in read_frame_header_()
2403 decoder->private_->frame.header.sample_rate = x*1000; in read_frame_header_()
2405 decoder->private_->frame.header.sample_rate = x; in read_frame_header_()
2407 decoder->private_->frame.header.sample_rate = x*10; in read_frame_header_()
2411 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) in read_frame_header_()
2422 decoder->private_->next_fixed_block_size = 0; in read_frame_header_()
2423 if(decoder->private_->frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER) { in read_frame_header_()
2424 x = decoder->private_->frame.header.number.frame_number; in read_frame_header_()
2425 decoder->private_->frame.header.number_type = FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER; in read_frame_header_()
2426 if(decoder->private_->fixed_block_size) in read_frame_header_()
2427 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->fixed_bloc… in read_frame_header_()
2428 else if(decoder->private_->has_stream_info) { in read_frame_header_()
2429 …if(decoder->private_->stream_info.data.stream_info.min_blocksize == decoder->private_->stream_info… in read_frame_header_()
2430 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->stream_inf… in read_frame_header_()
2431 …decoder->private_->next_fixed_block_size = decoder->private_->stream_info.data.stream_info.max_blo… in read_frame_header_()
2437 decoder->private_->frame.header.number.sample_number = 0; in read_frame_header_()
2438 decoder->private_->next_fixed_block_size = decoder->private_->frame.header.blocksize; in read_frame_header_()
2442 …decoder->private_->frame.header.number.sample_number = (FLAC__uint64)decoder->private_->frame.head… in read_frame_header_()
2461 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &x, 8)) /* MAGIC NUMBER */ in read_subframe_()
2469 if(!FLAC__bitreader_read_unary_unsigned(decoder->private_->input, &u)) in read_subframe_()
2471 decoder->private_->frame.subframes[channel].wasted_bits = u+1; in read_subframe_()
2472 bps -= decoder->private_->frame.subframes[channel].wasted_bits; in read_subframe_()
2475 decoder->private_->frame.subframes[channel].wasted_bits = 0; in read_subframe_()
2517 x = decoder->private_->frame.subframes[channel].wasted_bits; in read_subframe_()
2518 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_subframe_()
2519 decoder->private_->output[channel][i] <<= x; in read_subframe_()
2527 FLAC__Subframe_Constant *subframe = &decoder->private_->frame.subframes[channel].data.constant; in read_subframe_constant_()
2530 FLAC__int32 *output = decoder->private_->output[channel]; in read_subframe_constant_()
2532 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_CONSTANT; in read_subframe_constant_()
2534 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &x, bps)) in read_subframe_constant_()
2541 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) in read_subframe_constant_()
2550 FLAC__Subframe_Fixed *subframe = &decoder->private_->frame.subframes[channel].data.fixed; in read_subframe_fixed_()
2555 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_FIXED; in read_subframe_fixed_()
2557 subframe->residual = decoder->private_->residual[channel]; in read_subframe_fixed_()
2562 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, bps)) in read_subframe_fixed_()
2568 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_TY… in read_subframe_fixed_()
2574 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_PA… in read_subframe_fixed_()
2577 …subframe->entropy_coding_method.data.partitioned_rice.contents = &decoder->private_->partitioned_r… in read_subframe_fixed_()
2589 …ethod.data.partitioned_rice.order, &decoder->private_->partitioned_rice_contents[channel], decoder… in read_subframe_fixed_()
2598 memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order); in read_subframe_fixed_()
2599 …_restore_signal(decoder->private_->residual[channel], decoder->private_->frame.header.blocksize-or… in read_subframe_fixed_()
2607 FLAC__Subframe_LPC *subframe = &decoder->private_->frame.subframes[channel].data.lpc; in read_subframe_lpc_()
2612 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_LPC; in read_subframe_lpc_()
2614 subframe->residual = decoder->private_->residual[channel]; in read_subframe_lpc_()
2619 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, bps)) in read_subframe_lpc_()
2625 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__SUBFRAME_LPC_QLP_COEFF_P… in read_subframe_lpc_()
2635 …if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, FLAC__SUBFRAME_LPC_QLP_SHIFT_LE… in read_subframe_lpc_()
2641 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i32, subframe->qlp_coeff_precision)) in read_subframe_lpc_()
2647 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_TY… in read_subframe_lpc_()
2653 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &u32, FLAC__ENTROPY_CODING_METHOD_PA… in read_subframe_lpc_()
2656 …subframe->entropy_coding_method.data.partitioned_rice.contents = &decoder->private_->partitioned_r… in read_subframe_lpc_()
2668 …ethod.data.partitioned_rice.order, &decoder->private_->partitioned_rice_contents[channel], decoder… in read_subframe_lpc_()
2677 memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order); in read_subframe_lpc_()
2684private_->local_lpc_restore_signal_16bit_order8(decoder->private_->residual[channel], decoder->pri… in read_subframe_lpc_()
2686private_->local_lpc_restore_signal_16bit(decoder->private_->residual[channel], decoder->private_->… in read_subframe_lpc_()
2689private_->local_lpc_restore_signal(decoder->private_->residual[channel], decoder->private_->frame.… in read_subframe_lpc_()
2691private_->local_lpc_restore_signal_64bit(decoder->private_->residual[channel], decoder->private_->… in read_subframe_lpc_()
2699 FLAC__Subframe_Verbatim *subframe = &decoder->private_->frame.subframes[channel].data.verbatim; in read_subframe_verbatim_()
2700 FLAC__int32 x, *residual = decoder->private_->residual[channel]; in read_subframe_verbatim_()
2703 decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_VERBATIM; in read_subframe_verbatim_()
2707 for(i = 0; i < decoder->private_->frame.header.blocksize; i++) { in read_subframe_verbatim_()
2708 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &x, bps)) in read_subframe_verbatim_()
2715 …memcpy(decoder->private_->output[channel], subframe->data, sizeof(FLAC__int32) * decoder->private_ in read_subframe_verbatim_()
2726 …_samples = partition_order > 0? decoder->private_->frame.header.blocksize >> partition_order : dec… in read_residual_partitioned_rice_()
2732 if(decoder->private_->frame.header.blocksize < predictor_order) { in read_residual_partitioned_rice_()
2753 if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &rice_parameter, plen)) in read_residual_partitioned_rice_()
2759 …if(!decoder->private_->local_bitreader_read_rice_signed_block(decoder->private_->input, residual +… in read_residual_partitioned_rice_()
2764 …if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &rice_parameter, FLAC__ENTROPY_CODIN… in read_residual_partitioned_rice_()
2768 if(!FLAC__bitreader_read_raw_int32(decoder->private_->input, &i, rice_parameter)) in read_residual_partitioned_rice_()
2780 if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) { in read_zero_padding_()
2782 …treader_read_raw_uint32(decoder->private_->input, &zero, FLAC__bitreader_bits_left_for_byte_alignm… in read_zero_padding_()
2799 !decoder->private_->is_ogg && in read_callback_()
2801 …decoder->private_->eof_callback && decoder->private_->eof_callback(decoder, decoder->private_->cli… in read_callback_()
2818 if(decoder->private_->is_seeking && decoder->private_->unparseable_frame_count > 20) { in read_callback_()
2825 decoder->private_->is_ogg? in read_callback_()
2828 decoder->private_->read_callback(decoder, buffer, bytes, decoder->private_->client_data) in read_callback_()
2840 !decoder->private_->is_ogg && in read_callback_()
2842 …decoder->private_->eof_callback && decoder->private_->eof_callback(decoder, decoder->private_->cli… in read_callback_()
2875 …gg_decoder_aspect, buffer, bytes, read_callback_proxy_, decoder, decoder->private_->client_data)) { in read_callback_ogg_aspect_()
2903 switch(decoder->private_->read_callback(decoder, buffer, bytes, client_data)) { in read_callback_proxy_()
2920 if(decoder->private_->is_seeking) { in write_audio_frame_to_client_()
2923 FLAC__uint64 target_sample = decoder->private_->target_sample; in write_audio_frame_to_client_()
2928 decoder->private_->got_a_frame = true; in write_audio_frame_to_client_()
2930 decoder->private_->last_frame = *frame; /* save the frame */ in write_audio_frame_to_client_()
2934 decoder->private_->is_seeking = false; in write_audio_frame_to_client_()
2941 decoder->private_->last_frame.header.blocksize -= delta; in write_audio_frame_to_client_()
2942 decoder->private_->last_frame.header.number.sample_number += (FLAC__uint64)delta; in write_audio_frame_to_client_()
2944 …return decoder->private_->write_callback(decoder, &decoder->private_->last_frame, newbuffer, decod… in write_audio_frame_to_client_()
2948 … return decoder->private_->write_callback(decoder, frame, buffer, decoder->private_->client_data); in write_audio_frame_to_client_()
2960 if(!decoder->private_->has_stream_info) in write_audio_frame_to_client_()
2961 decoder->private_->do_md5_checking = false; in write_audio_frame_to_client_()
2963 if(decoder->private_->do_md5_checking) { in write_audio_frame_to_client_()
2964 …if(!FLAC__MD5Accumulate(&decoder->private_->md5context, buffer, frame->header.channels, frame->hea… in write_audio_frame_to_client_()
2968 return decoder->private_->write_callback(decoder, frame, buffer, decoder->private_->client_data); in write_audio_frame_to_client_()
2974 if(!decoder->private_->is_seeking) in send_error_to_client_()
2975 decoder->private_->error_callback(decoder, status, decoder->private_->client_data); in send_error_to_client_()
2977 decoder->private_->unparseable_frame_count++; in send_error_to_client_()
2982 …FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound,… in seek_to_absolute_sample_()
2988 const unsigned min_blocksize = decoder->private_->stream_info.data.stream_info.min_blocksize; in seek_to_absolute_sample_()
2989 const unsigned max_blocksize = decoder->private_->stream_info.data.stream_info.max_blocksize; in seek_to_absolute_sample_()
2990 const unsigned max_framesize = decoder->private_->stream_info.data.stream_info.max_framesize; in seek_to_absolute_sample_()
2991 const unsigned min_framesize = decoder->private_->stream_info.data.stream_info.min_framesize; in seek_to_absolute_sample_()
2995 …FLAC__StreamMetadata_SeekTable *seek_table = decoder->private_->has_seek_table? &decoder->private_ in seek_to_absolute_sample_()
2999 channels = decoder->private_->stream_info.data.stream_info.channels; in seek_to_absolute_sample_()
3001 bps = decoder->private_->stream_info.data.stream_info.bits_per_sample; in seek_to_absolute_sample_()
3095 decoder->private_->target_sample = target_sample; in seek_to_absolute_sample_()
3120 …if(decoder->private_->seek_callback(decoder, (FLAC__uint64)pos, decoder->private_->client_data) !=… in seek_to_absolute_sample_()
3134 decoder->private_->unparseable_frame_count = 0; in seek_to_absolute_sample_()
3146 if(!decoder->private_->is_seeking) in seek_to_absolute_sample_()
3149 …FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NU… in seek_to_absolute_sample_()
3150 this_frame_sample = decoder->private_->last_frame.header.number.sample_number; in seek_to_absolute_sample_()
3152 …if (0 == decoder->private_->samples_decoded || (this_frame_sample + decoder->private_->last_frame.… in seek_to_absolute_sample_()
3173 upper_bound_sample = this_frame_sample + decoder->private_->last_frame.header.blocksize; in seek_to_absolute_sample_()
3182 lower_bound_sample = this_frame_sample + decoder->private_->last_frame.header.blocksize; in seek_to_absolute_sample_()
3224 decoder->private_->target_sample = target_sample; in seek_to_absolute_sample_ogg_()
3253 …if(decoder->private_->seek_callback((FLAC__StreamDecoder*)decoder, (FLAC__uint64)pos, decoder->pri… in seek_to_absolute_sample_ogg_()
3266 decoder->private_->got_a_frame = false; in seek_to_absolute_sample_ogg_()
3271 if(!decoder->private_->got_a_frame) { in seek_to_absolute_sample_ogg_()
3289 else if(!decoder->private_->is_seeking) { in seek_to_absolute_sample_ogg_()
3293 this_frame_sample = decoder->private_->last_frame.header.number.sample_number; in seek_to_absolute_sample_ogg_()
3294 …FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NU… in seek_to_absolute_sample_ogg_()
3336 *bytes = fread(buffer, sizeof(FLAC__byte), *bytes, decoder->private_->file); in file_read_callback_()
3337 if(ferror(decoder->private_->file)) in file_read_callback_()
3352 if(decoder->private_->file == stdin) in file_seek_callback_()
3354 else if(fseeko(decoder->private_->file, (off_t)absolute_byte_offset, SEEK_SET) < 0) in file_seek_callback_()
3365 if(decoder->private_->file == stdin) in file_tell_callback_()
3367 else if((pos = ftello(decoder->private_->file)) < 0) in file_tell_callback_()
3380 if(decoder->private_->file == stdin) in file_length_callback_()
3382 else if(fstat(fileno(decoder->private_->file), &filestats) != 0) in file_length_callback_()
3394 return feof(decoder->private_->file)? true : false; in file_eof_callback_()