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

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

#include <flacmetadata.h>

Public Member Functions

 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...
 
uint16 minBlockSize () const
 Returns the minimum block size (in samples) used in the stream. More...
 
uint16 maxBlockSize () const
 Returns the maximum block size (in samples) used in the stream. More...
 
uint32 minFrameSize () const
 Returns the minimum frame size (in bytes) used in the stream. More...
 
uint32 maxFrameSize () const
 The maximum frame size (in bytes) used in the stream. More...
 
uint32 samplingFrequency () const
 Returns the sampling frequency in Hz. More...
 
byte channelCount () const
 Returns the number of channels. More...
 
byte bitsPerSample () const
 Returns the bits per sample. More...
 
uint64 totalSampleCount () const
 Returns the total samples in stream. More...
 
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 119 of file flacmetadata.h.

Constructor & Destructor Documentation

◆ FlacMetaDataBlockStreamInfo()

Media::FlacMetaDataBlockStreamInfo::FlacMetaDataBlockStreamInfo ( )
inline

Constructs a new FLAC "METADATA_BLOCK_STREAMINFO".

Definition at line 151 of file flacmetadata.h.

Member Function Documentation

◆ bitsPerSample()

byte Media::FlacMetaDataBlockStreamInfo::bitsPerSample ( ) const
inline

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 229 of file flacmetadata.h.

◆ channelCount()

byte Media::FlacMetaDataBlockStreamInfo::channelCount ( ) const
inline

Returns the number of channels.

FLAC supports from 1 to 8 channels .

Definition at line 217 of file flacmetadata.h.

◆ maxBlockSize()

uint16 Media::FlacMetaDataBlockStreamInfo::maxBlockSize ( ) const
inline

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

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

Definition at line 176 of file flacmetadata.h.

◆ maxFrameSize()

uint32 Media::FlacMetaDataBlockStreamInfo::maxFrameSize ( ) const
inline

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

May be 0 to imply the value is not known.

Definition at line 196 of file flacmetadata.h.

◆ md5Sum()

const char * Media::FlacMetaDataBlockStreamInfo::md5Sum ( ) const
inline

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 253 of file flacmetadata.h.

◆ minBlockSize()

uint16 Media::FlacMetaDataBlockStreamInfo::minBlockSize ( ) const
inline

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

Definition at line 166 of file flacmetadata.h.

◆ minFrameSize()

uint32 Media::FlacMetaDataBlockStreamInfo::minFrameSize ( ) const
inline

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

May be 0 to imply the value is not known.

Definition at line 186 of file flacmetadata.h.

◆ parse()

void Media::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()

uint32 Media::FlacMetaDataBlockStreamInfo::samplingFrequency ( ) const
inline

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 207 of file flacmetadata.h.

◆ totalSampleCount()

uint64 Media::FlacMetaDataBlockStreamInfo::totalSampleCount ( ) const
inline

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 242 of file flacmetadata.h.


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