[xiph-commits] r7943 - in trunk/oggdsf: . docs

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sat Oct 9 02:09:35 PDT 2004


Author: illiminable
Date: 2004-10-09 02:09:34 -0700 (Sat, 09 Oct 2004)
New Revision: 7943

Added:
   trunk/oggdsf/docs/old_flac_changes_i_made.txt
Modified:
   trunk/oggdsf/VERSIONS
Log:
* Pre flac update...


Modified: trunk/oggdsf/VERSIONS
===================================================================
--- trunk/oggdsf/VERSIONS	2004-10-09 08:30:32 UTC (rev 7942)
+++ trunk/oggdsf/VERSIONS	2004-10-09 09:09:34 UTC (rev 7943)
@@ -5,6 +5,7 @@
 libfishsound	-	0.6.3
 libogg		-	1.1.1
 libtheora	-	1.0alpha3
+libFLAC		-	1.1.1
 
 * Whilst under early development, filters and all other 
   libraries have same version number as packages.

Added: trunk/oggdsf/docs/old_flac_changes_i_made.txt
===================================================================
--- trunk/oggdsf/docs/old_flac_changes_i_made.txt	2004-10-09 08:30:32 UTC (rev 7942)
+++ trunk/oggdsf/docs/old_flac_changes_i_made.txt	2004-10-09 09:09:34 UTC (rev 7943)
@@ -0,0 +1,49 @@
+Changes to old version of FLAC i made...
+
+stream_decoder.c (line 542)
+
+FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder)
+{
+	FLAC__ASSERT(0 != decoder);
+	FLAC__ASSERT(0 != decoder->private_);
+	FLAC__ASSERT(0 != decoder->protected_);
+
+	if(!FLAC__bitbuffer_clear(decoder->private_->input)) {
+		decoder->protected_->state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR;
+		return false;
+	}
+	decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;
+	//Insert by ZEN:::
+	decoder->private_->samples_decoded = 0;
+
+	return true;
+}
+
+
+bitbuffer.c (line 184)
+
+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)
+{
+	unsigned bytes;
+	FLAC__byte *target;
+
+	/* first shift the unconsumed buffer data toward the front as much as possible */
+	if(bb->total_consumed_bits >= FLAC__BITS_PER_BLURB) {
+		unsigned l = 0, r = bb->consumed_blurbs, r_end = bb->blurbs + (bb->bits? 1:0);
+		for( ; r < r_end; l++, r++)
+			bb->buffer[l] = bb->buffer[r];
+		for( ; l < r_end; l++)
+			bb->buffer[l] = 0;
+		//Added by Zen:::
+		FLAC__ASSERT(bb->blurbs >= bb->consumed_blurbs);
+		bb->blurbs -= bb->consumed_blurbs;
+		bb->total_bits -= FLAC__BLURBS_TO_BITS(bb->consumed_blurbs);
+		bb->consumed_blurbs = 0;
+		bb->total_consumed_bits = bb->consumed_bits;
+	}
+
+	/* grow if we need to */
+	if(bb->capacity <= 1) {
+		if(!bitbuffer_resize_(bb, 16))
+			return false;
+	}



More information about the commits mailing list