Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Audio format structure
The audio format structure that fully defines a stream's audio information. More...

Topics

 <em>Value Help</em>
 

Classes

class  kodi::audioengine::AudioEngineFormat
 

Functions

void kodi::audioengine::AudioEngineFormat::SetDataFormat (enum AudioEngineDataFormat format)
 The stream's data format (eg, AUDIOENGINE_FMT_S16LE)
 
enum AudioEngineDataFormat kodi::audioengine::AudioEngineFormat::GetDataFormat () const
 To get with SetDataFormat changed values.
 
void kodi::audioengine::AudioEngineFormat::SetSampleRate (unsigned int rate)
 The stream's sample rate (eg, 48000)
 
unsigned int kodi::audioengine::AudioEngineFormat::GetSampleRate () const
 To get with SetSampleRate changed values.
 
void kodi::audioengine::AudioEngineFormat::SetEncodedRate (unsigned int rate)
 The encoded streams sample rate if a bitstream, otherwise undefined.
 
unsigned int kodi::audioengine::AudioEngineFormat::GetEncodedRate () const
 To get with SetEncodedRate changed values.
 
void kodi::audioengine::AudioEngineFormat::SetChannelLayout (const std::vector< enum AudioEngineChannel > &layout)
 The stream's channel layout.
 
std::vector< enum AudioEngineChannelkodi::audioengine::AudioEngineFormat::GetChannelLayout () const
 To get with SetChannelLayout changed values.
 
void kodi::audioengine::AudioEngineFormat::SetFramesAmount (unsigned int frames)
 The number of frames per period.
 
unsigned int kodi::audioengine::AudioEngineFormat::GetFramesAmount () const
 To get with SetFramesAmount changed values.
 
void kodi::audioengine::AudioEngineFormat::SetFrameSize (unsigned int frameSize)
 The size of one frame in bytes.
 
unsigned int kodi::audioengine::AudioEngineFormat::GetFrameSize () const
 To get with SetFrameSize changed values.
 
bool kodi::audioengine::AudioEngineFormat::CompareFormat (const AudioEngineFormat *fmt)
 Function to compare the format structure with another.
 

Detailed Description

Audio format structure
The audio format structure that fully defines a stream's audio information.

With the help of this format information, Kodi adjusts its processing accordingly.

The following table contains values that can be set with class AudioEngineFormat :

Name Type Set call Get call
Data format, see AudioEngineDataFormat for available types enum SetDataFormat GetDataFormat
Sample rate unsigned int SetSampleRate GetSampleRate
Encoded rate unsigned int SetEncodedRate GetEncodedRate
Channel layout, see AudioEngineChannel for available types std::vector<enum AudioEngineChannel> SetChannelLayout GetChannelLayout
Frames amount unsigned int SetFramesAmount GetFramesAmount
Frame size unsigned int SetFrameSize GetFrameSize

Further is CompareFormat included to compare this class with another.

Function Documentation

◆ CompareFormat()

bool kodi::audioengine::AudioEngineFormat::CompareFormat ( const AudioEngineFormat * fmt)
inline

Function to compare the format structure with another.

◆ GetChannelLayout()

std::vector< enum AudioEngineChannel > kodi::audioengine::AudioEngineFormat::GetChannelLayout ( ) const
inline

To get with SetChannelLayout changed values.

◆ GetDataFormat()

enum AudioEngineDataFormat kodi::audioengine::AudioEngineFormat::GetDataFormat ( ) const
inline

To get with SetDataFormat changed values.

◆ GetEncodedRate()

unsigned int kodi::audioengine::AudioEngineFormat::GetEncodedRate ( ) const
inline

To get with SetEncodedRate changed values.

◆ GetFramesAmount()

unsigned int kodi::audioengine::AudioEngineFormat::GetFramesAmount ( ) const
inline

To get with SetFramesAmount changed values.

◆ GetFrameSize()

unsigned int kodi::audioengine::AudioEngineFormat::GetFrameSize ( ) const
inline

To get with SetFrameSize changed values.

◆ GetSampleRate()

unsigned int kodi::audioengine::AudioEngineFormat::GetSampleRate ( ) const
inline

To get with SetSampleRate changed values.

◆ SetChannelLayout()

void kodi::audioengine::AudioEngineFormat::SetChannelLayout ( const std::vector< enum AudioEngineChannel > & layout)
inline

The stream's channel layout.

◆ SetDataFormat()

void kodi::audioengine::AudioEngineFormat::SetDataFormat ( enum AudioEngineDataFormat format)
inline

The stream's data format (eg, AUDIOENGINE_FMT_S16LE)

◆ SetEncodedRate()

void kodi::audioengine::AudioEngineFormat::SetEncodedRate ( unsigned int rate)
inline

The encoded streams sample rate if a bitstream, otherwise undefined.

◆ SetFramesAmount()

void kodi::audioengine::AudioEngineFormat::SetFramesAmount ( unsigned int frames)
inline

The number of frames per period.

◆ SetFrameSize()

void kodi::audioengine::AudioEngineFormat::SetFrameSize ( unsigned int frameSize)
inline

The size of one frame in bytes.

◆ SetSampleRate()

void kodi::audioengine::AudioEngineFormat::SetSampleRate ( unsigned int rate)
inline

The stream's sample rate (eg, 48000)