1 Changes to old version of FLAC i made...
\r
3 stream_decoder.c (line 542)
\r
5 FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder)
7 FLAC__ASSERT(0 != decoder);
8 FLAC__ASSERT(0 != decoder->private_);
9 FLAC__ASSERT(0 != decoder->protected_);
11 if(!FLAC__bitbuffer_clear(decoder->private_->input)) {
12 decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
15 decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;
17 decoder->private_->samples_decoded = 0;
23 bitbuffer.c (line 184)
\r
25 static FLAC__bool bitbuffer_read_from_client_(FLAC__BitBuffer *bb, FLAC__bool (*read_callback)(FLAC__byte buffer[], unsigned *bytes, void *client_data), void *client_data)
30 /* first shift the unconsumed buffer data toward the front as much as possible */
31 if(bb->total_consumed_bits >= FLAC__BITS_PER_BLURB) {
32 unsigned l = 0, r = bb->consumed_blurbs, r_end = bb->blurbs + (bb->bits? 1:0);
33 for( ; r < r_end; l++, r++)
34 bb->buffer[l] = bb->buffer[r];
35 for( ; l < r_end; l++)
38 FLAC__ASSERT(bb->blurbs >= bb->consumed_blurbs);
39 bb->blurbs -= bb->consumed_blurbs;
40 bb->total_bits -= FLAC__BLURBS_TO_BITS(bb->consumed_blurbs);
41 bb->consumed_blurbs = 0;
42 bb->total_consumed_bits = bb->consumed_bits;
45 /* grow if we need to */
46 if(bb->capacity <= 1) {
47 if(!bitbuffer_resize_(bb, 16))