Tag Parser  8.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | List of all members
TagParser::FlacMetaDataBlockStreamInfo Class Reference

The FlacMetaDataBlockStreamInfo class is a FLAC "METADATA_BLOCK_STREAMINFO" parser. More...

#include <flacmetadata.h>

Public Member Functions

constexpr FlacMetaDataBlockStreamInfo ()
 Constructs a new FLAC "METADATA_BLOCK_STREAMINFO". More...
 
void parse (const char *buffer)
 Parses the FLAC "METADATA_BLOCK_STREAMINFO" which is read using the specified iterator. More...
 
constexpr uint16 minBlockSize () const
 Returns the minimum block size (in samples) used in the stream. More...
 
constexpr uint16 maxBlockSize () const
 Returns the maximum block size (in samples) used in the stream. More...
 
constexpr uint32 minFrameSize () const
 Returns the minimum frame size (in bytes) used in the stream. More...
 
constexpr uint32 maxFrameSize () const
 The maximum frame size (in bytes) used in the stream. More...
 
constexpr uint32 samplingFrequency () const
 Returns the sampling frequency in Hz. More...
 
constexpr byte channelCount () const
 Returns the number of channels. More...
 
constexpr byte bitsPerSample () const
 Returns the bits per sample. More...
 
constexpr uint64 totalSampleCount () const
 Returns the total samples in stream. More...
 
constexpr const char * md5Sum () const
 Returns the MD5 signature of the unencoded audio data. More...
 

Detailed Description

The FlacMetaDataBlockStreamInfo class is a FLAC "METADATA_BLOCK_STREAMINFO" parser.

See also
https://xiph.org/flac/format.html

Definition at line 110 of file flacmetadata.h.

Constructor & Destructor Documentation

◆ FlacMetaDataBlockStreamInfo()

constexpr TagParser::FlacMetaDataBlockStreamInfo::FlacMetaDataBlockStreamInfo ( )

Constructs a new FLAC "METADATA_BLOCK_STREAMINFO".

Definition at line 141 of file flacmetadata.h.

Member Function Documentation

◆ bitsPerSample()

constexpr byte TagParser::FlacMetaDataBlockStreamInfo::bitsPerSample ( ) const

Returns the bits per sample.

FLAC supports from 4 to 32 bits per sample. Currently the reference encoder and decoders only support up to 24 bits per sample.

Definition at line 220 of file flacmetadata.h.

◆ channelCount()

constexpr byte TagParser::FlacMetaDataBlockStreamInfo::channelCount ( ) const

Returns the number of channels.

FLAC supports from 1 to 8 channels .

Definition at line 208 of file flacmetadata.h.

◆ maxBlockSize()

constexpr uint16 TagParser::FlacMetaDataBlockStreamInfo::maxBlockSize ( ) const

Returns the maximum block size (in samples) used in the stream.

(Minimum blocksize == maximum blocksize) implies a fixed-blocksize stream.

Definition at line 167 of file flacmetadata.h.

◆ maxFrameSize()

constexpr uint32 TagParser::FlacMetaDataBlockStreamInfo::maxFrameSize ( ) const

The maximum frame size (in bytes) used in the stream.

May be 0 to imply the value is not known.

Definition at line 187 of file flacmetadata.h.

◆ md5Sum()

constexpr const char * TagParser::FlacMetaDataBlockStreamInfo::md5Sum ( ) const

Returns the MD5 signature of the unencoded audio data.

This allows the decoder to determine if an error exists in the audio data even when the error does not result in an invalid bitstream.

Definition at line 244 of file flacmetadata.h.

◆ minBlockSize()

constexpr uint16 TagParser::FlacMetaDataBlockStreamInfo::minBlockSize ( ) const

Returns the minimum block size (in samples) used in the stream.

Definition at line 157 of file flacmetadata.h.

◆ minFrameSize()

constexpr uint32 TagParser::FlacMetaDataBlockStreamInfo::minFrameSize ( ) const

Returns the minimum frame size (in bytes) used in the stream.

May be 0 to imply the value is not known.

Definition at line 177 of file flacmetadata.h.

◆ parse()

void TagParser::FlacMetaDataBlockStreamInfo::parse ( const char *  buffer)

Parses the FLAC "METADATA_BLOCK_STREAMINFO" which is read using the specified iterator.

Remarks
The specified buffer must be at least 0x22 bytes long.

Definition at line 59 of file flacmetadata.cpp.

◆ samplingFrequency()

constexpr uint32 TagParser::FlacMetaDataBlockStreamInfo::samplingFrequency ( ) const

Returns the sampling frequency in Hz.

Though 20 bits are available, the maximum sample rate is limited by the structure of frame headers to 655350Hz. Also, a value of 0 is invalid.

Definition at line 198 of file flacmetadata.h.

◆ totalSampleCount()

constexpr uint64 TagParser::FlacMetaDataBlockStreamInfo::totalSampleCount ( ) const

Returns the total samples in stream.

'Samples' means inter-channel sample, i.e. one second of 44.1Khz audio will have 44100 samples regardless of the number of channels.

A value of zero here means the number of total samples is unknown.

Definition at line 233 of file flacmetadata.h.


The documentation for this class was generated from the following files: