3 #include "../ogg/oggiterator.h" 5 #include "../exceptions.h" 7 #include <c++utilities/conversion/binaryconversion.h> 24 void FlacToOggMappingHeader::parseHeader(
OggIterator &iterator)
27 char buff[0x0D + 0x04 + 0x22 - 0x05];
28 iterator.
read(buff, 5);
29 if(*buff != 0x7Fu || BE::toUInt32(buff + 1) != 0x464C4143u) {
32 iterator.
read(buff,
sizeof(buff));
35 m_majorVersion =
static_cast<byte
>(*(buff + 0x00));
36 m_minorVersion =
static_cast<byte
>(*(buff + 0x01));
37 m_headerCount = BE::toUInt16(buff + 0x02);
38 if(BE::toUInt32(buff + 0x04) != 0x664C6143u) {
45 if(header.
type() != FlacMetaDataBlockType::StreamInfo) {
53 m_streamInfo.parse(buff + 0x0D + 0x04 - 0x05);