Displaying 2 results from an estimated 2 matches for "outputaddresspointer".
2010 Jun 23
0
FLAC StreamInfo Parsing
...around to make room for the new bits. When pulling
values out of the accumulator, you do that based upon the number of
bits requested.
In other words, instead of:
GetEndianBytes(streamArray, streamOffset, numBytes);
... you should implement:
(long long)GetBigEndianStreamBits(streamHandle, outputAddressPointer,
(unsigned)numBits);
The return value will have to be 64-bit to handle totalSamples. The
nice thing is that you won't need any indexing or bit shifting,
because GetBigEndianStreamBits() will directly return the value you
ask for, based upon the number of bits requested.
I mean, you c...
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: