Displaying 4 results from an estimated 4 matches for "minblocksize".
Did you mean:
min_blocksize
2010 Jun 23
3
FLAC StreamInfo Parsing
Thank you very much! But how to deal with endianness in the case of
bit stream? Some blocks (for example MinBlockSize) require 16bits
(simply swap first and second), some block (e.g.MinFrameSize) require
3 byte-array to be reverted.
Finally totalSamples is stored in 5 bytes ( only last 4 bits from
first one byte are used). It was a real issue to make it little-endian
(here is how I did it:
http://code.google.com/...
2010 Jun 22
0
FLAC StreamInfo Parsing
Hello!
I'm implementing custom flac metadata parser. Currently the very big
trouble is to parse StreamInfo metadata block.
According to specifications
(http://flac.sourceforge.net/format.html#metadata_block_streaminfo)
we've got 2 bytes fir minBlockSize, 2 bytes for maxBlock size, 3 + 3
bytes for min/max FrameSize.
Now the interesting point -- sampleRate. number of channels, buts per
sample and total samples in stream.
20 + 3 + 5 + 36 == 64 bits == 8 bytes.
To parse sample rate I take 3 bytes then reverse order (windows uses
little endian by de...
2010 Jun 22
2
FLAC StreamInfo Parsing
Hello Ilia,
The FLAC format by nature is not a byte stream, it's a bit stream.
Therefore, in order to parse it you need too build a bit-reading
infrastructure. Eg. a class that accepts a byte stream, implements
buffering, etc, etc, and supports reading a specified number of bits, not
bytes as you are used to. There is quite a lot of bit logic there, but
nothing too scary.
Best Regards,
2010 Jun 23
0
FLAC StreamInfo Parsing
On Jun 22, 2010, at 21:27, Ilia Ternovich wrote:
> Thank you very much! But how to deal with endianness in the case of
> bit stream? Some blocks (for example MinBlockSize) require 16bits
> (simply swap first and second), some block (e.g.MinFrameSize) require
> 3 byte-array to be reverted.
>
> Finally totalSamples is stored in 5 bytes ( only last 4 bits from
> first one byte are used). It was a real issue to make it little-endian
> (here is how I di...