3 #include "../ogg/oggiterator.h" 5 #include "../exceptions.h" 7 #include <c++utilities/conversion/binaryconversion.h> 24 void OpusIdentificationHeader::parseHeader(
OggIterator &iterator)
27 iterator.
read(buff, 8);
28 if(BE::toUInt64(buff) != 0x4F70757348656164u) {
31 iterator.
read(buff,
sizeof(buff));
32 m_version =
static_cast<byte
>(*(buff));
33 m_channels =
static_cast<byte
>(*(buff + 1));
34 m_preSkip = LE::toUInt16(buff + 2);
35 m_sampleRate = LE::toUInt32(buff + 4);
36 m_outputGain = LE::toUInt16(buff + 8);
37 m_channelMap =
static_cast<byte
>(*(buff + 10));