Ogg Vorbis comment field specification
</font></h1>
-<em>Last update to this document: January 19, 2001</em><p>
+<em>Last update to this document: February 9, 2001</em><p>
The text comment header is the second (of three) header packets that
begin a Vorbis bitstream. It is meant for short, text comments,
OggSquish, Vorbis, Xiphophorus and their logos are trademarks (tm) of
<a href="http://www.xiph.org/">Xiphophorus</a>. These pages are
-copyright (C) 1994-2000 Xiphophorus. All rights reserved.<p>
+copyright (C) 1994-2001 Xiphophorus. All rights reserved.<p>
</body>
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
-
+ * *
********************************************************************
function: simple example decoder
- last mod: $Id: decoder_example.c,v 1.18 2001/02/26 03:50:38 xiphmont Exp $
+ last mod: $Id: decoder_example.c,v 1.19 2001/03/26 23:27:42 xiphmont Exp $
********************************************************************/
********************************************************************
function: PCM data vector blocking, windowing and dis/reassembly
- last mod: $Id: block.c,v 1.46 2001/02/26 03:50:41 xiphmont Exp $
+ last mod: $Id: block.c,v 1.47 2001/03/26 23:27:42 xiphmont Exp $
Handle windowing, overlap-add, etc of the PCM vectors. This is made
more amusing by Vorbis' current two allowed block sizes.
codec_setup_info *ci=vi->codec_setup;
_vds_shared_init(v,vi,0);
- /* Adjust centerW to allow an easier mechanism for determining output */
- v->pcm_returned=v->centerW;
- v->centerW-= ci->blocksizes[v->W]/4+ci->blocksizes[v->lW]/4;
+ v->pcm_returned=-1;
v->granulepos=-1;
v->sequence=-1;
}
+ /* deal with initial packet state; we do this using the explicit
+ pcm_returned==-1 flag otherwise we're sensitive to first block
+ being short or long */
+
+ if(v->pcm_returned==-1)
+ v->pcm_returned=centerW;
/* track the frame number... This is for convenience, but also
making sure our last packet doesn't end with added padding. If
/* partial last frame. Strip the extra samples off */
centerW-=extra;
}else if(vb->sequence == 1){
+ /* ^^^ argh, this can be 1 from seeking! */
+
+
/* partial first frame. Discard extra leading samples */
v->pcm_returned+=extra;
if(v->pcm_returned>centerW)v->pcm_returned=centerW;
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
-
********************************************************************
function: libvorbis codec headers
- last mod: $Id: codec_internal.h,v 1.7 2001/02/26 03:50:41 xiphmont Exp $
+ last mod: $Id: codec_internal.h,v 1.8 2001/03/26 23:27:43 xiphmont Exp $
********************************************************************/