[Vorbis] Question About syncing

devel engineering at wwrn.net
Fri May 15 08:55:01 PDT 2009


On Tuesday 12 May 2009 12:16:08 pm you wrote:
> On Tue, May 12, 2009 at 10:02 AM, devel <engineering at wwrn.net> wrote:
> >  What exactly does it mean when, in the decoder_example.c file, you try
> > to extract the information from the comments and codebook headers and you
> > loose sync? What is actually being check to determine when sync is lost?.
> > I known one part of it is that there is a gaps in the stream. Is the CRC
> > value  the determining factor? Please detail! I read a lot of the
> > documents. I still am a little fuzzy.
>
> "Losing sync" in the context of the vorbis code usually means
> synchronization between the libogg read position and the beginning of
> the next Ogg page in the stream. This is verified two ways: presence
> of the 'OggS' magic sequence at the current read position, correct CRC
> value for the subsequent page data. Normally, there will be a page
> right where the code expects it to be. If the 'OggS' or CRC check
> fail, then the file is corrupt, and it tries to find a place where
> decoding can begin again by searching forward for the next 'OggS'
> marking a new page and they trying the CRC from that point. When that
> happens, the reader is said to have "regained sync" after "hole in
> data".


As I indicate in a previous post  "Help with old to new sources" I am trying 
to upgrade and learn how the decode method is achieve. The biggest problem I 
am having is chaining at the moment. The code will play the first stream 
successfully but the second stream in the chain fails in the 
CodeBookAndPreMetaData function. I was encourage to write a simplified 
tutorial but I would like all of the code to work. I want to understand how to 
fix this but use it as a good problem solving exercise.  attach is a file 
(HowToCodeOggVorbis.tar.gz).

w3rn
-rr


-------------- next part --------------
A non-text attachment was scrubbed...
Name: HowToCodeOggVorbis.tar.gz
Type: application/x-compressed-tar
Size: 5708 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20090515/17ea1d94/attachment.bin 


More information about the Vorbis mailing list