[flac-dev] FLAC frame boundaries and protocol

2019-03-05 Thread Dave Harris
Hello, I've set up and have been reading through the FLAC reference implementation source code on Windows and stepping through it in the debugger.   I've been trying to understand how the protocol knows where the subframe and frame boundaries are. Is there a good tutorial that discusses the in

Re: [flac-dev] FLAC frame boundaries and protocol

2019-03-05 Thread Brian Willoughby
Hello Dave. Frames start with a 14-bit sync code, which is 13 “one" bits and 1 “zero" bit. Subframes start with a 1-bit padding of “zero." Keep in mind that FLAC is a bit stream, not a byte stream, so that 14-bit frame sync can happen anywhere in a pair of bytes. You can’t simply scan memory by