[Flac-dev] Finding start of audio data using metadata level 2 interface.

Dan Sully daniel at electricrain.com
Tue Sep 28 00:21:35 PDT 2004

* Josh Coalson <xflac at yahoo.com> shaped the electrons to say...

>yep, that will work too.  but just writing skipping code is
>pretty simple:
>read 'fLaC' string
>while (!is_last) {
>   read 1 byte metadata block type
>   read 3 byte metadata block length
>   is_last = type & 0x80
>   fseek(file,length,SEEK_CUR)
>see also:
>  http://flac.sourceforge.net/format.html#metadata_block_header
>'length' is big-endian

Should type be of FLAC__byte, and length of FLAC__uint32? I'm not having much
luck here.. (not a C programmer by nature).

This movie has warped my fragile little mind.

More information about the Flac-dev mailing list