Tag Parser  7.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
opusidentificationheader.h
Go to the documentation of this file.
1 #ifndef TAG_PARSER_OPUSIDENTIFICATIONHEADER_H
2 #define TAG_PARSER_OPUSIDENTIFICATIONHEADER_H
3 
4 #include "../global.h"
5 
6 #include <c++utilities/conversion/types.h>
7 
8 namespace TagParser {
9 
10 class OggIterator;
11 
13 public:
15 
16  void parseHeader(OggIterator &iterator);
17 
18  byte version() const;
19  byte channels() const;
20  uint16 preSkip() const;
21  uint32 sampleRate() const;
22  uint16 outputGain() const;
23  byte channelMap() const;
24 
25 private:
26  byte m_version;
27  byte m_channels;
28  uint16 m_preSkip;
29  uint32 m_sampleRate;
30  uint16 m_outputGain;
31  byte m_channelMap;
32 };
33 
38  : m_version(0)
39  , m_channels(0)
40  , m_sampleRate(0)
41  , m_outputGain(0)
42  , m_channelMap(0)
43 {
44 }
45 
50 {
51  return m_version;
52 }
53 
58 {
59  return m_channels;
60 }
61 
69 inline uint16 OpusIdentificationHeader::preSkip() const
70 {
71  return m_preSkip;
72 }
73 
80 {
81  return m_sampleRate;
82 }
83 
91 {
92  return m_outputGain;
93 }
94 
103 {
104  return m_channelMap;
105 }
106 
107 } // namespace TagParser
108 
109 #endif // TAG_PARSER_OPUSIDENTIFICATIONHEADER_H
byte channelMap() const
Returns the channel mapping family.
OpusIdentificationHeader()
Constructs a new Opus identification header.
TAG_PARSER_EXPORT const char * version()
The OggIterator class helps iterating through all segments of an OGG bitstream.
Definition: oggiterator.h:11
The OpusIdentificationHeader class is an Opus identification header parser.
byte version() const
Returns the version (which should be 1 currently).
byte channels() const
Returns the number of channels for the Opus stream.
uint16 outputGain() const
Returns the output gain.
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
uint16 preSkip() const
Returns "pre-skip" value for the Opus stream.
uint32 sampleRate() const
Returns the INPUT sample rate.