4 #include "../ogg/oggiterator.h" 6 #include "../exceptions.h" 8 #include <c++utilities/conversion/binaryconversion.h> 11 using namespace ConversionUtilities;
24 void VorbisIdentificationHeader::parseHeader(
OggIterator &iterator)
27 iterator.
read(buff, 7);
28 if ((BE::toUInt64(buff) & 0xffffffffffffff00u) != 0x01766F7262697300u) {
31 iterator.
read(buff,
sizeof(buff));
32 m_version = LE::toUInt32(buff);
33 m_channels = static_cast<byte>(*(buff + 4));
34 m_sampleRate = LE::toUInt32(buff + 5);
35 m_maxBitrate = LE::toUInt32(buff + 9);
36 m_nominalBitrate = LE::toUInt32(buff + 13);
37 m_minBitrate = LE::toUInt32(buff + 17);
38 m_blockSize = static_cast<byte>(*(buff + 21));
39 m_framingFlag = static_cast<byte>(*(buff + 22));
void read(char *buffer, std::size_t count)
Reads count bytes from the OGG stream and writes it to the specified buffer.
The OggIterator class helps iterating through all segments of an OGG bitstream.
The exception that is thrown when the data to be parsed or to be made seems invalid and therefore can...
Contains all classes and functions of the TagInfo library.